UndeadHarlequin Posted November 26, 2008 Share Posted November 26, 2008 Hi I tested some @sw_ flags Every flag was useable... But when ever i used "sw_hide" i couldnt find the window... and i couldnt "restore ist" even not with winsetstate("","",@sw_showdefault) nore with winsetstate("","",@sw_restore) I tryed to write lines or anything like that,.. Plz look up this. Can you find any errors? CODEopt("winwaitdelay",5) Run("notepad.exe "&"help.txt","C:\Dokumente und Einstellungen\ArlenDoremin\Desktop",@SW_SHOWMINNOACTIVE and @SW_LOCK); @SW_LOCK WinWait("Help.txt - Editor") $e=ControlGetHandle("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?","[CLASS:Edit; INSTANCE:1]") Sleep(1000) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_SHOWdefault) Sleep(1000) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_HIDE) Sleep(1000) msgbox(1,"",WinExists("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?")) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_RESTORE) $d=ControlGetText("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?","[CLASS:Edit; INSTANCE:1]") MsgBox(1,"",$d) Thanks 4 help Link to comment Share on other sites More sharing options...
mmavipc Posted November 26, 2008 Share Posted November 26, 2008 Hi I tested some @sw_ flags Every flag was useable... But when ever i used "sw_hide" i couldnt find the window... and i couldnt "restore ist" even not with winsetstate("","",@sw_showdefault) nore with winsetstate("","",@sw_restore) I tryed to write lines or anything like that,.. Plz look up this. Can you find any errors? CODEopt("winwaitdelay",5) Run("notepad.exe "&"help.txt","C:\Dokumente und Einstellungen\ArlenDoremin\Desktop",@SW_SHOWMINNOACTIVE and @SW_LOCK); @SW_LOCK WinWait("Help.txt - Editor") $e=ControlGetHandle("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?","[CLASS:Edit; INSTANCE:1]") Sleep(1000) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_SHOWdefault) Sleep(1000) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_HIDE) Sleep(1000) msgbox(1,"",WinExists("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?")) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_RESTORE) $d=ControlGetText("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?","[CLASS:Edit; INSTANCE:1]") MsgBox(1,"",$d) Thanks 4 helpyou need to use the @SW_SHOWDEFAULT flag after you have hidden the window [size="10"]Pure Au3 crypt funcs(I'm currently also working on making a dll from this)[/size][Y] Be more active in the community[Y] Get 200 posts[N] Get 300 posts[N] Make a Topic in the example scripts forum with at least 50 replies.People who currently hate me:ValikSmOke_N Link to comment Share on other sites More sharing options...
UndeadHarlequin Posted November 26, 2008 Author Share Posted November 26, 2008 stil does not work:-/(tested both before,.. and now) Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 26, 2008 Share Posted November 26, 2008 Hi I tested some @sw_ flags Every flag was useable... But when ever i used "sw_hide" i couldnt find the window... and i couldnt "restore ist" even not with winsetstate("","",@sw_showdefault) nore with winsetstate("","",@sw_restore) I tryed to write lines or anything like that,.. Plz look up this. Can you find any errors? CODEopt("winwaitdelay",5) Run("notepad.exe "&"help.txt","C:\Dokumente und Einstellungen\ArlenDoremin\Desktop",@SW_SHOWMINNOACTIVE and @SW_LOCK); @SW_LOCK WinWait("Help.txt - Editor") $e=ControlGetHandle("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?","[CLASS:Edit; INSTANCE:1]") Sleep(1000) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_SHOWdefault) Sleep(1000) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_HIDE) Sleep(1000) msgbox(1,"",WinExists("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?")) WinSetState("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?",@SW_RESTORE) $d=ControlGetText("Help.txt - Editor","Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?","[CLASS:Edit; INSTANCE:1]") MsgBox(1,"",$d) Thanks 4 help Get the window handle early on so you don't have to repeat the long strings for title and text to identify the window: Global $hWin Global $sWinText = "Ist ein Bug aufgetreten, oder eine der Erklärungen unverständlich?" Run("notepad.exe", @TempDir, @SW_SHOWMINNOACTIVE) WinWait("Untitled - Notepad") $hWin = WinGetHandle("Untitled - Notepad") Sleep(1000) WinSetState($hWin, "", @SW_SHOWdefault) Sleep(1000) WinSetState($hWin, "", @SW_HIDE) Sleep(1000) WinSetState($hWin, "", @SW_RESTORE) Sleep(1000) ControlSetText($hWin, "", "[CLASS:Edit; INSTANCE:1]", $sWinText) Sleep(1000) $sReadText = ControlGetText($hWin, "", "[CLASS:Edit; INSTANCE:1]") MsgBox(64, "Text", $sReadText) Your window flags for the Run() are invalid: "@SW_SHOWMINNOACTIVE and @SW_LOCK" The operator "and" doesn't work that way and isn't appropriate for combining modes anyway. Do the Run() with just one mode and then do WinSetState() with @SW_LOCK after the window comes up. In other contexts where you want to combine options by bits, use BitOr(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
UndeadHarlequin Posted November 27, 2008 Author Share Posted November 27, 2008 Thanks, works much better now ^^ 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