Code builders
Moderators: JRL, Dorian (MJT support)
Code builders
Hi, we have installed the trial version of macro scheduler. we find that some of the code builder functions which are provided did not work when used in the script like, Gettreenode, push button, setfocus etc. Please help
Last edited by Aditi on Tue Mar 20, 2012 1:56 pm, edited 3 times in total.
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Please post some exact code.
Show an example how you are trying to use it in a script.
Show an example how you are trying to use it in a script.
Phil Pendlebury - Linktree
Hi Phil,Phil Pendlebury wrote:Please post some exact code.
Show an example how you are trying to use it in a script.
Here is a sample code we tried to check a check box(Directory Create) using SetCheckBox function from the code builders, but it didn't work. Please let us know if there is any other method to select checkbox. Thankyou.
WaitWindowOpen>General
Send>TestDir
Press Tab
Send> Description
Wait>2.61
MouseMove>30,108
Wait>1.96
LClick
Wait>1.35
Let>WF_TYPE=1
GetCheckBox>New Window,Directory Create,res
If>res=1,checked,unchecked
Label>checked
Let>WF_TYPE=1
SetCheckBox>New Window,Directory Create,FALSE
Goto>end
Label>unchecked
SetCheckBox>New Window,Directory Create,TRUE
Label>end
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Ok thanks,
First of all you mentioned in your original post that SetFocus> doesn't work. So unless you were just writing that without testing it, it would seem that your actual window titles are wrong.
Having said that, GetCheckBox> is not always guaranteed to work.
So try this.
Make sure you have the exact window name of the window you want to operate on.
To test set focus simply start this script then put another window on top of the one you want to work on and wait 3 seconds... If setfocus is working and you have the correct window name then the window will of course come to the front of the screen.
What result do you see if you run this?
Try ticking the box first and then try it again unticking it.
What do you see?
First of all you mentioned in your original post that SetFocus> doesn't work. So unless you were just writing that without testing it, it would seem that your actual window titles are wrong.
Having said that, GetCheckBox> is not always guaranteed to work.
So try this.
Make sure you have the exact window name of the window you want to operate on.
To test set focus simply start this script then put another window on top of the one you want to work on and wait 3 seconds... If setfocus is working and you have the correct window name then the window will of course come to the front of the screen.
Code: Select all
Wait>3
SetFocus>YOURWINDOWNAME*
Wait>0.5
GetCheckBox>YOURWINDOWNAME,OBJECTCAPTION,result
MDL>result
Try ticking the box first and then try it again unticking it.
What do you see?
Phil Pendlebury - Linktree
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Yes it looks like your check box was not identified. Some else may be able to suggest another (less simple) way.
Phil Pendlebury - Linktree