Guest lsteinmetz Posted July 8, 2004 Share Posted July 8, 2004 Hello, I have problems, to convert a V2 script into V3. The script should fill out login fields automatically if they appear. That means that the script must run in the backgroud. Script (V2): SetKeyDelay, 0 WinWaitClose, UPS32 [ADLIB] Benutzer anmelden,, Send, JAK{TAB}1234{ENTER} Fehler bei Objekt,, Send, !o PROFIBOARD.DLL,, Send, {SPACE} SQL Meldung,, Send, !o User login,, Send, JAK{TAB}1234{ENTER} Thanx Link to comment Share on other sites More sharing options...
jpm Posted July 8, 2004 Share Posted July 8, 2004 I don't undertstand your V2 script as an ADLIB section is only one line The [ADLIB]Section The [ADLIB] section is optional, and if present should be placed at the end of the script file. The ADLIB section is designed to cope with unexpected conditions. The ADLIB section consists of single line commands that check if a window is active and if so, send keys to it. The ADLIB section must start with the line "[ADLIB]".Any Way with V3 you can put any thing in the function defined by AdLibEnable(...) you just need to transform every line with if WinExist(...) then send(...) Link to comment Share on other sites More sharing options...
Nutster Posted July 8, 2004 Share Posted July 8, 2004 (edited) Hello, SetKeyDelay, 0 WinWaitClose, UPS32 [ADLIB] Benutzer anmelden,, Send, JAK{TAB}1234{ENTER} Fehler bei Objekt,, Send, !o PROFIBOARD.DLL,, Send, {SPACE} SQL Meldung,, Send, !o User login,, Send, JAK{TAB}1234{ENTER}To convert your ADLIB section, create an AdLib function, which you activate with AdLibEnable at the beginning of your script. AdLibEnable("AdLibFunction") Opt("SendKeyDelay", 1) WinWaitClose("UPS32") Func AdLibFunction() If WinExists("Benutzer anmelden") Then WinActivate("Benutzer anmelden") Send("JAK{TAB}1234{ENTER}") ElseIf WinExists("User login") Then WinActivate("User login") Send("JAK{TAB}1234{ENTER}") ElseIf WinExists("Fehler bei Objekt") Then WinActivate("Fehler bei Objekt") Send("!o") ElseIf WinExists("SQL Meldung") Then WinActivate("SQL Meldung") Send("!o") ElseIf WinExists("PROFIBOARD.DLL") Then WinActivate("PROFIBOARD.DLL") Send("{SPACE}") EndIf EndFunc Edit: Fix code. Edited July 9, 2004 by Nutster David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... 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