mikezwet2 Posted December 3, 2004 Share Posted December 3, 2004 (edited) Hello everyone, I am new here and have made already some simple script. Now i have to made a script that press a button in a file save menu. In AU3_Spy.exe i see "class: button2" . I dont know how to put this in a schript step. Can somebody help me? Greetings, Mike Edited December 3, 2004 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2004 Developers Share Posted December 3, 2004 Hello everyone,I am new here and have made already some simple script.Now i have to made a script that press a button in a file save menu. In AU3_Spy.exe i see "class: button2" . I dont know how to put this in a schript step.Can somebody help me?Greetings, Mike<{POST_SNAPBACK}>Check the helpfile for ControlClick() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 3, 2004 Author Share Posted December 3, 2004 I dont know how to do this :"> so i made a screenshot, mayby you can explain what i have to fill in.,Mike Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2004 Developers Share Posted December 3, 2004 (edited) I dont know how to do this :"> so i made a screenshot, mayby you can explain what i have to fill in.,Mike<{POST_SNAPBACK}>Iets als dit zou moeten werken (Something like this): Opt("WinTitleMatchMode", 1) ControlClick ( "Records naar bestand", "", "Button2") Edited December 3, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
SlimShady Posted December 3, 2004 Share Posted December 3, 2004 Opt("WinTitleMatchMode", 2) $Title = "Records naar" ControlClick($Title, "", "Button2") Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 3, 2004 Author Share Posted December 3, 2004 (edited) Iets als dit zou moeten werken (Something like this): Opt("WinTitleMatchMode", 1) ControlClick ( "Records naar bestand", "", "Button2") <{POST_SNAPBACK}>It works great, but sometimes he dont put's the file just anywere on the computer, how can i set a location, by example c:/export ?What's the "WinTitleMatchMode" in this line?Dank u wel Edited December 3, 2004 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2004 Developers Share Posted December 3, 2004 It works great, but sometimes he dont put's the file just anywere on the computer, how can i set a location, by example c:/export ?<{POST_SNAPBACK}>Just fill the whole path + filename in the bestandnaam field.What's the "WinTitleMatchMode" in this line?Dank u wel <{POST_SNAPBACK}>WinTitleMatchMode Alters the method that is used to match window titles during search operations.1 = Match the title from the start (default)2 = Match any substring in the title3 = Exact title match4 = Advanced mode, see Window Titles & Text (Advanced) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 3, 2004 Author Share Posted December 3, 2004 (edited) Just fill the whole path + filename in the bestandnaam field.<{POST_SNAPBACK}>That was a little change in my database but it works now.I only get sometimes the message "want to overwrite" with yes or no option: The solution is to add an extra Opt("WinTitleMatchMode", 1) ControlClick ( "Records naar bestand", "", "Button1")Or a if formula, but here it comes, i dont know how to insert that..... If message overwrite > Opt("WinTitleMatchMode", 1) ControlClick ( "Records naar bestand", "", "Button1") else verder gaan met script Edited December 3, 2004 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Developers Jos Posted December 3, 2004 Developers Share Posted December 3, 2004 (edited) Mike, i don't know how the extra question thing looks and if its a seperate window, but the best thing for optional text boxes is to add an adlib function. Something like: Opt("WinTitleMatchMode", 1) AdlibEnable("extra_Windows") ; do you stuff filling in the window ; click to button ControlClick ( "Records naar bestand", "", "Button1") AdlibDisable() ; do the rest Func extra_Windows() If WinExists("Whatever the title is of the window", "Text to make it unique") then ControlClick ("Whatever the title is of the window", "Text to make it unique", "Button1") EndIf EndFunc Edited December 4, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
normeus Posted December 4, 2004 Share Posted December 4, 2004 Ask a plain vanilla question that can be answered from the help file and people will chew your ARSE but post a picture of a windows DESKTOP from AMSTERDAM and help comes your way. (I too was mesmerized by the wording on the windows dialog so had to reply even if I am not adding anything to the answer) Vanille is afkomstig uit peulen die groeien aan een plant die behoort tot de orchideeënfamilie. http://www.autoitscript.com/autoit3/scite/...iTe4AutoIt3.exe Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 4, 2004 Author Share Posted December 4, 2004 (edited) Alright, i have to make a folder under c: I can use the DirCreate ( "path" ) but it has to be a name, this name, exally the whole path is on my clipbord, so it can be a message where i can paste the path in and click ok. Is this possible? if not i can use the code as on top and always use the same folder. Not varible Edited December 4, 2004 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 4, 2004 Author Share Posted December 4, 2004 ClipGet() will get the clipboard contents...DirCreate(ClipGet())I apologize if I don't understand the goal...Lar.<{POST_SNAPBACK}>It works, i have made the following code and have in the clipbord the path: C:\DVDCollectie15\lijsttab.tabFileOpen(ClipGet()) Send ("^a") Send ("^c") WinActivate("FileMaker Developer", "") WinClose("lijsttab.tab - Kladblok", "") ExitI get a failmessage in line 0: Fileopen(clipget()) error: incorrect number of parameters in function call.I dont know what's wrong? Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Developers Jos Posted December 5, 2004 Developers Share Posted December 5, 2004 It works, i have made the following code and have in the clipbord the path: C:\DVDCollectie15\lijsttab.tabFileOpen(ClipGet()) Send ("^a") Send ("^c") WinActivate("FileMaker Developer", "") WinClose("lijsttab.tab - Kladblok", "") ExitI get a failmessage in line 0: Fileopen(clipget()) error: incorrect number of parameters in function call.I dont know what's wrong?<{POST_SNAPBACK}>FileOpen has 2 parameter;FileOpen ( "filename", mode )You have 1...... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 5, 2004 Author Share Posted December 5, 2004 (edited) FileOpen has 2 parameter;FileOpen ( "filename", mode )You have 1...... <{POST_SNAPBACK}>Sorry :"> I have add that and, the path "C:\DVDCollectie15\lijsttab.tab" is in my clipbord.Then i call up the script, this one must:Open the file, C:\DVDCollectie15\lijsttab.tabSelect all textCopy this selected tekstClose the file lijsttab.tabReturn to Filemaker developerexit scriptFilemaker pro paste the copied text into a field.This is my script:FileOpen(ClipGet(), 0) Send ("^a") Send ("^c") WinClose("lijsttab.tab - Kladblok", "") WinActivate("FileMaker Developer", "") ExitThe thing he do now is select al items in folder where the exe is in.Also i try to put this line as second step:WinWaitActive("lijsttab.tab - Kladblok")Still not working but when i open lijsttab.tab manual the script takes over and it worksSo i think the error is in the first line,Whats wrong in the eyes of a professional? Edited December 5, 2004 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
Developers Jos Posted December 5, 2004 Developers Share Posted December 5, 2004 So i think the error is in the first line,Whats wrong in the eyes of a professional? <{POST_SNAPBACK}>FileOpen opens a file so you can read its records with FileRead or FileReadLine..Don't know what the Send ("^a") ; select allSend ("^c") ; copy are doing here in your script ???????? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 5, 2004 Author Share Posted December 5, 2004 (edited) I did it with another way:Run("notepad.exe") WinWaitActive("Naamloos - Kladblok") Send ("^o") WinActivate("Openen") Send ("^v") ; paste the path and filename from clipbord Opt("WinTitleMatchMode", 1) ControlClick ( "Openen", "", "Button2") Send ("^a") Send ("^c") WinClose("lijsttab.tab", "") WinActivate("FileMaker Developer", "") WinWaitActive("FileMaker Developer") Send ("^v"); paste all selected text from lijsttab.tab to filemaker database field ExitThis works really great, the only problem is when somebody use a english language windows version. I think there a way's to fix this like:If oslanguage = dutch.......else........But that's to mutch for me at this time.I LIKE AUTOIT script Edited December 5, 2004 by mikezwet2 Zwetsloot Kunststof Kozijnen Fabriek and Mike Zwetsloot Link to comment Share on other sites More sharing options...
ezzetabi Posted December 5, 2004 Share Posted December 5, 2004 (edited) Check @OSLang macro values and use a select case.E.g.Select Case @OSLang = 1009;English_Canadian ; Case @OSLang = 042f;Macedonian ; Case @OSLang = 0406;Danish ; Case Else ;Unknow language. EndSelect Edited December 5, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
Developers Jos Posted December 5, 2004 Developers Share Posted December 5, 2004 This works really great, the only problem is when somebody use a english language windows version. I think there a way's to fix this like:I LIKE AUTOIT script <{POST_SNAPBACK}>You could use the classname which i presume is the same in all languages:Opt("WinTitleMatchMode", 4) Run("notepad.exe") WinWaitActive("classname=Notepad") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikezwet2 Posted December 6, 2004 Author Share Posted December 6, 2004 You could use the classname which i presume is the same in all languages:Opt("WinTitleMatchMode", 4) Run("notepad.exe") WinWaitActive("classname=Notepad")<{POST_SNAPBACK}>Use the classname is a good option i think,The whole process i made works, but when its ends (al database steps are done) there's one script still in the background waiting for a window, when i open it the script ends. Is it dangerous to leave this script on the back? or is there a way to close it.One more time, i dont know how its possible that it is still running, it has and exit step at the end. 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