blackjack550 发表于 2021-8-3 16:02:28

如何让输入框联动工具刷新


根据用户emian的程序修改了一些样式想通过输入股票代码直接关注股票,目前输入代码可以刷新股票代码的文字,但是如何能触发InfoStock让他再次获取API呢?请高手指点

fontName=Tahoma
textSize=9
SecondVar="399006"
; fontName=Trebuchet MS
; textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
colordown=0,255,0,205
colorup=255,0,0,205
update.Spd=15
Quote=http://hq.sinajs.cn/list=s_sz#SecondVar#

;输入框

; The InputText.dll plugin has special powers: it allows user input.
; However, it's not the easiest way to start learning Rainmeter. Get a
; hold of the basics, and then check out the manual entry for InputText.
Measure=Plugin
Plugin=InputText.dll
SolidColor=0,64,128,180
StringAlign=Left
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
X=10
Y=38
W=170
H=17
FocusDismiss=1
DefaultValue=""
; Command1=["http://hq.sinajs.cn/list=s_sz$UserInput$"]
Command1=[!SetVariable SecondVar "$UserInput$"]
; Command2=!InfoStock1
UpdateDivider=86400


Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=#Quote#
RegExp="(?siU)var hq_str_(.*)="(.*),(.*),(.*),(.*),(.*),(.*)";"
CodePage=936
StringIndex=7
UpdateRate=#update.Spd#

goeway 发表于 2021-10-28 13:57:20

本帖最后由 goeway 于 2021-10-28 14:14 编辑

方法一:

将行37写成 Command1=[!SetVariable SecondVar "$UserInput$"][!Delay 233][!CommandMeasure InfoStock1 "Update"]
在48行下面加上
DynamicVariables=1
这样子不知行不行,或许还要在振幅涨跌幅点位等下加上DynamicVariables=1

方法二:

直接将行37写成

Command1=[!WriteKeyValue Variables SecondVar "$UserInput$"][!Refresh]你的皮肤相当简单,用方法二简单搞搞就得了
页: [1]
查看完整版本: 如何让输入框联动工具刷新