Write new Control Text

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
GlennT
Newbie
Posts: 1
Joined: Sat Feb 16, 2008 5:31 pm
Location: USA

Write new Control Text

Post by GlennT » Sat Feb 16, 2008 5:40 pm

I am sorry if this question has been already answered. I am new to this post and new to scripting in general. My problem is that I have a standard windows save file box. I want to take the default file name from the box, modify the name to create a unique name no matter how many times I run the script and them replace the file name in the control box. I have already figured out how to get
Control text and create a new file (yes I know my script is clumsy) but it works. My only problem is how to I replace the default filename in the control box with my new filename. This has me baffled. Thanks for the help
Glenn Thibeault, OnsiteIT

User avatar
JRL
Automation Wizard
Posts: 3505
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sat Feb 16, 2008 11:19 pm

If I'm understanding correctly you are using GetControlText> to acquire the filename. In that case you might be able to use SetControlText> to replace the default file name with your new one.

Otherwise you should be able to navigate to the file name field using either keyboard or mouse move commands and replace the filename using Send Character/Text>. To do this you might first need to remove the file name text using Press Del and/or Press Backspace. You can press keys multiple times using the syntax Press Del*100 for example.

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