Hi, All--
This is my second attempt at posting about this problem. My first post didn't show up, probably because I forgot to put in a subject line.
I am attempting to capture two numbers, the height and width of a photo in pixels, from Photoshop. Then I will use those numbers to automatically determine how to resize it.
The problem is that it appears that I can't capture these numbers using the clipboard because the clipboard captures it as text. Therefore the relational tests won't work.
I guess this means I need to be using the "Let" function but haven't found a way to do it. Here is the macro as it now is written. Any help would be greatly appreciated.
=============================
//compare height & width
press ctrl
send>c
release ctrl
getclipboard>width
wait>1
press tab * 2
press ctrl
send>c
release ctrl
getclipboard>height
wait>1
IF height > width
send> 130
wait>1
ENDIF
IF width > height
press shift
press tab * 2
release shift
send> 130
wait>1
ENDIF
IF width = height
send> 130
wait>1
ENDIF
press enter
=========================
Thanks,
timtom
Capturing a numerical value
Moderators: Dorian (MJT support), JRL
TimTom,
I don't have PhotoShop so I can't test this but if the ctrl+c is capturing the numbers (as text) that PhotoShop reports for the width and height of the image then Macro Scheduler will certainly be able to make comparisons between the two numbers.
You have multiple syntax errors including unneeded spaces in your code.
I have rewritten your submission with the errors fixed.
=============================
//compare height & width
press ctrl
send>c
release ctrl
getclipboard>width
wait>1
press tab*2
press ctrl
send>c
release ctrl
getclipboard>height
wait>1
IF>%height%>%width%
send>130
wait>1
ENDIF
IF>%width%>%height%
press shift
press tab*2
release shift
send>130
wait>1
ENDIF
IF>%width%=%height%
send>130
wait>1
ENDIF
press enter
=========================
I don't have PhotoShop so I can't test this but if the ctrl+c is capturing the numbers (as text) that PhotoShop reports for the width and height of the image then Macro Scheduler will certainly be able to make comparisons between the two numbers.
You have multiple syntax errors including unneeded spaces in your code.
I have rewritten your submission with the errors fixed.
=============================
//compare height & width
press ctrl
send>c
release ctrl
getclipboard>width
wait>1
press tab*2
press ctrl
send>c
release ctrl
getclipboard>height
wait>1
IF>%height%>%width%
send>130
wait>1
ENDIF
IF>%width%>%height%
press shift
press tab*2
release shift
send>130
wait>1
ENDIF
IF>%width%=%height%
send>130
wait>1
ENDIF
press enter
=========================
Capturing a numerical value
Thank you for your excellent advice. It now works great!!
Just want to, again, thank everyone for their help on this forum. I have used this group several times in the past and you folks always come through -- and very, very quickly. Can't tell you how much I appreciate it.
timtom
Just want to, again, thank everyone for their help on this forum. I have used this group several times in the past and you folks always come through -- and very, very quickly. Can't tell you how much I appreciate it.
timtom