mikezwet2 Posted February 16, 2005 Share Posted February 16, 2005 Hi everyone, I got the following code: WinActivate("Export Field to File") Send("^v") WinWaitActive("Export Field to File") Opt("WinTitleMatchMode", 2) ControlClick ( "Export Field to File", "", "Button2") Exit I want the script checks first if the message "filemakerpro" comes up, if that's true he must click on OK (button2). How looks the code for this? Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 16, 2005 Share Posted February 16, 2005 Hi everyone, I got the following code: WinActivate("Export Field to File") Send("^v") WinWaitActive("Export Field to File") Opt("WinTitleMatchMode", 2) ControlClick ( "Export Field to File", "", "Button2") ExitI want the script checks first if the message "filemakerpro" comes up, if that's true he must click on OK (button2).How looks the code for this?<{POST_SNAPBACK}>If WinExists("filemakerpro","",60) then ControlClick("","","Button2") Endif Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
mikezwet2 Posted February 16, 2005 Author Share Posted February 16, 2005 If WinExists("filemakerpro","",60) then ControlClick("","","Button2") Endif<{POST_SNAPBACK}>Alright, i was thinking to difficult.What means 60 in this winexists function? Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 16, 2005 Share Posted February 16, 2005 Alright, i was thinking to difficult.What means 60 in this winexists function?<{POST_SNAPBACK}>Timeout value. Check the help file. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
mikezwet2 Posted February 16, 2005 Author Share Posted February 16, 2005 (edited) WinActivate("Export Field to File") Send("^v") WinWaitActive("Export Field to File") Opt("WinTitleMatchMode", 2) ControlClick ( "Export Field to File", "", "Button2") If WinWaitActive("FileMaker Pro","",60) then ControlClick("","","Button1") Endif If WinWaitActive("FileMaker Pro","",60) then ControlClick("","","Button1") Endif Exit The script don't close when the screen "FileMaker Pro" not comes up, the script is in a loop so i have a lot open scripts. i need something like else close if ? Edited February 16, 2005 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 16, 2005 Share Posted February 16, 2005 WinActivate("Export Field to File") Send("^v") WinWaitActive("Export Field to File") Opt("WinTitleMatchMode", 2) ControlClick ( "Export Field to File", "", "Button2") If WinWaitActive("FileMaker Pro","",60) then ControlClick("","","Button1") Endif If WinWaitActive("FileMaker Pro","",60) then ControlClick("","","Button1") Endif ExitThe script don't close when the screen "FileMaker Pro" not comes up, the script is in a loop so i have a lot open scripts. i need something like else close if ?<{POST_SNAPBACK}>Read the help file on "ControlClick" You have to specify the window name or handle to send the control click to. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
mikezwet2 Posted February 17, 2005 Author Share Posted February 17, 2005 It's not in the clickcontrol i think, The script is waiting for the screen "FileMaker pro" but in some ways this screen does not appear and the script waits. Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
MHz Posted February 17, 2005 Share Posted February 17, 2005 Opt("TrayIconDebug", 1); Curser on systray icon will give current script line. WinWait("Export Field to File") WinActivate("Export Field to File") Send("^v") Opt("WinTitleMatchMode", 2) If WinWaitActive("Export Field to File") Then ControlClick ( "Export Field to File", "", "Button2") EndIf If WinWaitActive("FileMaker Pro","") then ControlClick("FileMaker Pro","","Button1") Endif If WinWaitActive("FileMaker Pro","") then ControlClick("FileMaker Pro","","Button1") Endif Exit TrayIconDebug option may help to know which line is a problem. The winwait added may help also? Oh, titles in ControlClicks, added, would be good also. Link to comment Share on other sites More sharing options...
mikezwet2 Posted February 17, 2005 Author Share Posted February 17, 2005 Opt("TrayIconDebug", 1); Curser on systray icon will give current script line. WinWait("Export Field to File") WinActivate("Export Field to File") Send("^v") Opt("WinTitleMatchMode", 2) If WinWaitActive("Export Field to File") Then ControlClick ( "Export Field to File", "", "Button2") EndIf If WinWaitActive("FileMaker Pro","") then ControlClick("FileMaker Pro","","Button1") Endif If WinWaitActive("FileMaker Pro","") then ControlClick("FileMaker Pro","","Button1") Endif ExitTrayIconDebug option may help to know which line is a problem. The winwait added may help also? Oh, titles in ControlClicks, added, would be good also. <{POST_SNAPBACK}>I know the problem: the script waits until the message with title "FileMaker pro" appaers. When is don't appear the script is not closing.How can i go further with the script if the message "FileMaker pro" not appears? Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
MHz Posted February 17, 2005 Share Posted February 17, 2005 (edited) Opt("TrayIconDebug", 1); Curser on systray icon will give current script line. AdlibEnable("_Extra_Window", 500); if the message "FileMaker pro" does appear. WinWait("Export Field to File") WinActivate("Export Field to File") Send("^v") Opt("WinTitleMatchMode", 2) If WinWaitActive("Export Field to File") Then ControlClick ( "Export Field to File", "", "Button2") EndIf Func _Extra_Window(); Adlib nominated function If WinExists("FileMaker Pro","") then ControlClick("FileMaker Pro","","Button1") Endif EndFunc Exit Perhaps an adlibenable may help then. It is set, as shown, to check every half second, for Filemaker window. Edit: Changed winwait to winexists. :"> Edited February 17, 2005 by MHz Link to comment Share on other sites More sharing options...
mikezwet2 Posted February 17, 2005 Author Share Posted February 17, 2005 Opt("TrayIconDebug", 1); Curser on systray icon will give current script line. AdlibEnable("_Extra_Window", 500); if the message "FileMaker pro" does appear. WinWait("Export Field to File") WinActivate("Export Field to File") Send("^v") Opt("WinTitleMatchMode", 2) If WinWaitActive("Export Field to File") Then ControlClick ( "Export Field to File", "", "Button2") EndIf Func _Extra_Window(); Adlib nominated function If WinExists("FileMaker Pro","") then ControlClick("FileMaker Pro","","Button1") Endif EndFunc ExitPerhaps an adlibenable may help then. It is set, as shown, to check every half second, for Filemaker window.Edit: Changed winwait to winexists. :"><{POST_SNAPBACK}>It works, but... the script doesn't click on the message "FileMaker Pro" when it appears Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
mikezwet2 Posted February 20, 2005 Author Share Posted February 20, 2005 I tried a lot of things but it stil dont click "Button 1" when the message "FileMaker Pro" comes up Whats wrong? Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now