Hello!
I have a little script and in it a function that is responsible for handling saves in PDFCreator. When such a situation arise, it should set the destination folder to one predestinated in a global variable (a folder in our innernetwork).
Originally I achieved this by moving the window to 0,0 then mouseclick on a specified coordinates on the screen (I know, I know, thats why I want to change it something more reliable, more intelligent)
My candidates were ControlSetText, ControlSend and ControlCommand. I rejected ControlCommand outright since it isn't really for this. ControlSend cause the script to exit, when it reaches the first point where it would use the function.
ControlSetText returns the next console (run_debug_mode=Y)
Here is my function so far: (sorry its under construction)
Func RenamePDF($TopUpName) Sleep(1000) WinActivate("PDFCreator 1.", "") WinWaitActive("PDFCreator 1.", "") ControlCommand("PDFCreator 1.", "", "[CLASSNN:ThunderRT6TextBox6]", "EditPaste", $TopUpName) ControlSetText("PDFCreator 1.", "", "[CLASSNN:ThunderRT6TextBox6]", $TopUpName) ControlClick("PDFCreator 1.", "", "[CLASSNN:ThunderRT6CommandButton7]") $WindowWaitCheck = WinWaitActive("Mentés másként", "", 5) If $WindowWaitCheck = 0 Then ControlClick("PDFCreator 1.", "", "[CLASSNN:ThunderRT6CommandButton7]") EndIf WinMove("Save as", "", 0, 0) ;MouseClick("", 565, 50) ;Not like this, to many possible errors! ;Send("{BS}" & $PDFmentesPath & "{Enter}") ;ControlCommand ;ControlSend("Save as", "", "[CLASSNN:ToolbarWindow323]", & $PDFmentesPath) ControlSetText("Save as", "", "[CLASSNN:ToolbarWindow323]", & $PDFmentesPath) ControlClick("Save as", "", "[CLASSNN:Button1]") Sleep(1500) EndFunc ;==>RenamePDF
I have a guess that there is a problem in how I try to write/send the variable $PDFmentesPath, but not sure I know how should I do it. Trying random things that come to mind for now.
Thank you for your time and help!