Unable to use my own variables in the gui editor

Area for english topics
Antworten
HenrikR
Beiträge: 8
Registriert: Do 31. Okt 2019, 11:04
Kontaktdaten:

Unable to use my own variables in the gui editor

Beitrag von HenrikR »

Hi

I have some info which I have defined in Autoit as a variable, in this case it is just $DateTime which contains the date and time, i can enter this line $DateTimeOnForm = GUICtrlCreateLabel($DateTime, 310, 20, 300, 25) and it will display the variable instead of the normal text entry. But I cannot do this in formstudio. I tried to import the gui from autoit, isf then changes the var name to "DateTime" as seen her $DateTimeLabel = GUICtrlCreateLabel("DateTime",343,20,143,25,BitOr($SS_LEFT,$SS_NOTIFY),-1)

Am I trying to do something that the formstudio cannot do or is there a workaround?

Regards
Henrik
Benutzeravatar
ISI360
Administrator
Beiträge: 305
Registriert: Fr 11. Okt 2013, 13:06
Kontaktdaten:

Re: Unable to use my own variables in the gui editor

Beitrag von ISI360 »

Hi

You can do this: You simply need to select "text from func" to your label in the formstudio and it should work.
"Text from func" tells the formstudio that the Data is not a String but a return of a func (or a direct variable).
You need to enter the var with the "$"-char: $DateTime
Then it should work as you expect.
HenrikR
Beiträge: 8
Registriert: Do 31. Okt 2019, 11:04
Kontaktdaten:

Re: Unable to use my own variables in the gui editor

Beitrag von HenrikR »

Ahh, great.
That worked.

Thanks for the help.

Regards
/HenrikR
Benutzeravatar
ISI360
Administrator
Beiträge: 305
Registriert: Fr 11. Okt 2013, 13:06
Kontaktdaten:

Re: Unable to use my own variables in the gui editor

Beitrag von ISI360 »

Glad to hear it worked ;)
Antworten