Hi
I'd like my script to ask me where it should click.
First it should ask me where I'd like it to click (maybe save the position in a variable) and then click the same position all the time.
I'm making a script for photoshop for inputing names and saving files each in seperate pdf.
Everything works great but everytime I run it on different file the position I need it to click on is different.
I need it to ask me where it should click everytime I run it.
Here's my script:
AutoIt
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $file = FileOpen("lista.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 Local $line = FileReadLine($file) Local $i If @error = -1 Then MsgBox(262144,"The End", "The End !!!") ExitLoop Clipput($line) While 1 Local $hWnd = WinWait("[CLASS:Photoshop]", "", 10) ; Activate the Photoshop window using the handle returned by WinWait. WinActivate($hWnd) MouseClick("left", 562, 613, 3) ; <<<<------ THIS IS THE THING THAT BOTHERS ME <<<<------- Sleep(1000) Send("^v") sleep(300) send("^s") Do sleep(200) until PixelGetColor(342, 299)=0xFFF791 sleep(200) $i=$i+1 Send($i) Sleep(500) Send("{ENTER}") Do sleep(200) until PixelGetColor(416, 319)=0x21A121 Send("{ENTER}") Do sleep(200) until PixelGetColor(447, 438)=0xFFFFFF ExitLoop WEnd WEnd FileClose($file)
Thx for your help