Lyee Posted December 19, 2016 Share Posted December 19, 2016 Hello guys, I'm working on basics with tags but I actually dont know how to do it correct. The tag $IE will create IE window and this $IE will have his own number $IE+$i but this code is not correct Code what I basically want: #include <IE.au3> $i = 0 IEstart() IEref() Func IEstart() $LoopCount = 0 Do Global $IE + $i = _IECreate('Google.com') $i += 1 $LoopCount += 1 Until $LoopCount = 10 EndFunc ;==>iestart Func IEref() $LoopCount = 0 Do _IEQuit($IE + $i) $i += 1 $LoopCount += 1 Until $LoopCount = 10 EndFunc ;==>ieref Btw I know that I can close this windows with ProcessClose function but I want it like this.. PS: How to tag $IE for second func( IEref() ) special for _IEQuit? That Global function doesnt work :/ Thanks for any help Link to comment Share on other sites More sharing options...
careca Posted December 21, 2016 Share Posted December 21, 2016 Im sorry could you explain what do you need the script to do? So, start 10 instances of google and leave at 10, is that it? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
InunoTaishou Posted December 21, 2016 Share Posted December 21, 2016 The reason it's not correct is because You're declaring your variable to hold the handle from _IECreat inside the for loop and making it global. Declare your global variables outside of functions $IE is not declared but you're trying to add $i to it You cannot add to the left hand side of the assignment operator (the =). You can in other languages but not here Hopefully that makes sense to you. You're better option is to store all of the handles inside an array #include <IE.au3> Global $aIeHandles[10] IEstart() IEref() Func IEstart() For $i = 0 to UBound($aIeHandles) - 1 $aIeHandles[$i] = _IECreate('Google.com') Next EndFunc ;==>iestart Func IEref() For $i = 0 to UBound($aIeHandles) - 1 _IEQuit($aIeHandles[$i]) Next EndFunc ;==>ieref 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