Jump to content
Lyee

Tags trouble

Recommended Posts

Lyee

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

 

Share this post


Link to post
Share on other sites
careca

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

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

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.

Firefox Profile Backup - Backup/restore previously saved profile.

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

Share this post


Link to post
Share on other sites
InunoTaishou

The reason it's not correct is because

  1. 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
  2. $IE is not declared but you're trying to add $i to it
  3. 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

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×