Sending variables

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
misterstyx
Newbie
Posts: 2
Joined: Tue Nov 19, 2024 4:52 pm

Sending variables

Post by misterstyx » Tue Nov 19, 2024 7:29 pm

Howdy

I'm attempting to save a file automatically. The save file option pops up and asks for a filename and location.

I pull the date and create a filename

GetDate>dt
StringReplace>dt,/,,nwdt
Wait>.5
Let>fn = I:\Report\AReports\ClientAR%nwdt%
Wait>.5
My variable shows up just fine in the Watch List.

Then I attempt to send the %fn% variable to the object.

UIClick>{"Export Report"},{"File name:"}
UISetValue>Export Report,File name:,%fn%

This pastes in %fn% literally. If I just put in %nwdt% it will put in the variable value. I'm still a bit unsure as to how to get this working.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1384
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Sending variables

Post by Dorian (MJT support) » Tue Nov 19, 2024 10:42 pm

It's the spaces. Try this :

Code: Select all

Let>fn=I:\Report\AReports\ClientAR%nwdt%
Yes, we have a Custom Scripting Service. Message me or go here

misterstyx
Newbie
Posts: 2
Joined: Tue Nov 19, 2024 4:52 pm

Re: Sending variables

Post by misterstyx » Wed Nov 20, 2024 3:47 pm

That appears to have done it.

Thank you very much.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1384
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Sending variables

Post by Dorian (MJT support) » Wed Nov 20, 2024 4:23 pm

Always happy to help.
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts