G'day again,
Using Version 6 with XP and Outlook 2003.
I am trying to get the correct result from a checkbox on the Print screen in Outlook. I only seem to be having problems with one box. I'm using the code from the Help files with my Print window:
GetCheckBox>Print,Print &attached files. Attachments will print to the default printer only.,res
If>res=1,checked,unchecked
Label>checked
Message>The checkbox is checked!
Goto>end
Label>unchecked
Message>The checkbox is not checked!
Label>end
It doesn't matter if this box is checked or not, the code gives me Not Checked every time. I've used it with other checkboxes on the same window:
GetCheckBox>Print,Print to &file,res
GetCheckBox>Print,C&ollate copies,res
Both of these checkboxes work with the GetCheckBox code.
The problem box contains fullstops. Could this be the problem? The letter "a" is definitely the keyboard toggle for this box.
Could someone please tell me where I'm going wrong?
Really appreciate any assistance.
TIA.
J.
Wrong result from GetCheckBox.
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Are you sure the checkbox caption is "Print &attached files. Attachments will print to the default printer only."? It is possible that it is only part of that and some of that is in an adjacent label. Use Tools/View System Windows to find it and see what the checkbox caption actuall is.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Thank you Bob and Marcus for your replies.
I had already checked for trailing spaces but did it again anyway. Still no joy.
I'm running Version 6 so I don't think it has the option for viewing the system windows. At least ... I couldn't find it.
I have tried shortening the caption, removing all spaces, removing spaces after the full stops, getting a screen print and comparing my text letter by letter, and space by space.
If I click on the label, a "highlight" (dotted line) appears all the way around the label which seems to indicate to my highly untrained eye, that the caption is all included in one label.
Any other thoughts, please? Is there another way to view the system windows?
TIA.
J.
I had already checked for trailing spaces but did it again anyway. Still no joy.
I'm running Version 6 so I don't think it has the option for viewing the system windows. At least ... I couldn't find it.
I have tried shortening the caption, removing all spaces, removing spaces after the full stops, getting a screen print and comparing my text letter by letter, and space by space.
If I click on the label, a "highlight" (dotted line) appears all the way around the label which seems to indicate to my highly untrained eye, that the caption is all included in one label.
Any other thoughts, please? Is there another way to view the system windows?
TIA.
J.
Hello,
I have now upgraded to Version 8 (HURRAY!!!).
I am still getting the same incorrect result from GetCheckbox for this one checkbox in the Print screen. I used Tools > View System Windows to identify what the true name of this checkbox is. This tool has confirmed the name as 197310 - Button "Print &attached files. Attachments will print to the default printer only."
On the same print screen are two other checkboxes called Print to &file and C&ollate copies. Both of these return the correct result from GetCheckBox.
Any ideas?
Kind regards,
J.
I have now upgraded to Version 8 (HURRAY!!!).
I am still getting the same incorrect result from GetCheckbox for this one checkbox in the Print screen. I used Tools > View System Windows to identify what the true name of this checkbox is. This tool has confirmed the name as 197310 - Button "Print &attached files. Attachments will print to the default printer only."
On the same print screen are two other checkboxes called Print to &file and C&ollate copies. Both of these return the correct result from GetCheckBox.
Any ideas?
Kind regards,
J.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
I see the problem. You have only one space between the two sentences in that caption. There are two spaces between "files." and "Attachments":
"Print &attached files.^^Attachments will print to the default printer only."
I've substituted the spaces with ^^.
To avoid mistakes like this, use the View System Windows tool. Find the object in the list, right click on it and select Copy Object Caption. Then paste that into the script. That will avoid typos.
So your script snippet should be:
GetCheckBox>Print,Print &attached files. Attachments will print to the default printer only.,res
If>res=1,checked,unchecked
Label>checked
Message>The checkbox is checked!
Goto>end
Label>unchecked
Message>The checkbox is not checked!
Label>end
This would be better:
GetCheckBox>Print,Print &attached files. Attachments will print to the default printer only.,res
If>res=1
MessageModal>The checkbox is checked
Else
If>res=0
MessageModal>The checkbox is not checked
Else
MessageModal>Could not locate checkbox
Endif
Endif
I see the problem. You have only one space between the two sentences in that caption. There are two spaces between "files." and "Attachments":
"Print &attached files.^^Attachments will print to the default printer only."
I've substituted the spaces with ^^.
To avoid mistakes like this, use the View System Windows tool. Find the object in the list, right click on it and select Copy Object Caption. Then paste that into the script. That will avoid typos.
So your script snippet should be:
GetCheckBox>Print,Print &attached files. Attachments will print to the default printer only.,res
If>res=1,checked,unchecked
Label>checked
Message>The checkbox is checked!
Goto>end
Label>unchecked
Message>The checkbox is not checked!
Label>end
This would be better:
GetCheckBox>Print,Print &attached files. Attachments will print to the default printer only.,res
If>res=1
MessageModal>The checkbox is checked
Else
If>res=0
MessageModal>The checkbox is not checked
Else
MessageModal>Could not locate checkbox
Endif
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?