Jump to content

running script while minimized


Recommended Posts

i want to make my script running on my program while it is minimized..

is there a way how i can run my script on one program when it is minimized, while i can do other stuff while it is working..

i am trying to make my script press enter continuously on a program, and make it minimize at the same time.. i also want to do other thing while the script is running and would not affect it..

anyone know how i can do this?

thanks

Link to comment
Share on other sites

the controlsend does not seems to work :D

is there any other ways? or mayb i done something wrong

You haven't posted any code or any information about your application...

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

You haven't posted any code or any information about your application...

this is my script

Global $UnPaused
HotKeySet("{ESC}", "Terminate")

$answer = MsgBox(4, "Free to use", "The program will nw start. Run?")



If $answer = 7 Then
    MsgBox(4096, "Free to use", "OK.  Bye!")
    Exit
EndIf


$bLoop = 1
While $bLoop = 1
    $text = InputBox("Free to use", "Please type in ""AX"" and click OK to continue")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        
        If $text <> "AX" Then
            MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
        Else
            $bLoop = 0   
        EndIf
    EndIf
WEnd

MsgBox(4096,"Free to use", "The program will now start!")

$aLink = FileGetShortcut (@DesktopDir & "\Loader1.lnk")
If NOT @Error Then ShellExecute($aLink[0], "", $aLink[1])
        WinWaitActive ( "Testoste" )
    WinSetOnTop("Testoste) -", "", 1)
    send( "{enter}" )
Winwaitactive ( "SS_Client" )
WinSetOnTop("SS_Client", "", 1)
Sleep( 20000 )

While 1
    send( "{enter}" )
    Sleep( 10000 )
WEnd

WinWait()
ControlEnable()

Func Terminate()
    Exit 0
EndFunc

i want the

While 1
    send( "{enter}" )
    Sleep( 10000 )
WEnd

to run while i am doing other stuff on the computer

Link to comment
Share on other sites

You can try...

While 1
    ; ControlSend ( "title", "text", controlID, "string" [, flag] )
    ControlSend("SS_Client", "", "", "{ENTER}")
    Sleep(10000)
WEnd

8)

i tried adding your code to it but it still does not seems to work..

the full script is now..

Global $UnPaused
HotKeySet("{ESC}", "Terminate")

$answer = MsgBox(4, "Free to use", "The program will nw start. Run?")



If $answer = 7 Then
    MsgBox(4096, "Free to use", "OK.  Bye!")
    Exit
EndIf


$bLoop = 1
While $bLoop = 1
    $text = InputBox("Free to use", "Please type in ""AX"" and click OK to continue")
    If @error = 1 Then
        MsgBox(4096, "Error", "You pressed 'Cancel' - try again!")
    Else
        
        If $text <> "AX" Then
            MsgBox(4096, "Error", "You typed in the wrong thing - try again!")
        Else
            $bLoop = 0  
        EndIf
    EndIf
WEnd

MsgBox(4096,"Free to use", "The program will now start!")

$aLink = FileGetShortcut (@DesktopDir & "\Loader1.lnk")
If NOT @Error Then ShellExecute($aLink[0], "", $aLink[1])
        WinWaitActive ( "Testoste" )
    WinSetOnTop("Testoste) -", "", 1)
    send( "{enter}" )
Winwaitactive ( "SS_Client" )
WinSetOnTop("SS_Client", "", 1)
Sleep( 20000 )

While 1
    ControlSend("SS_Client", "", "", "{ENTER}")
    Sleep(10000)
WEnd

WinWait()
ControlEnable()

Func Terminate()
    Exit 0
EndFunc

but nothing seems to happen after

$aLink = FileGetShortcut (@DesktopDir & "\Loader1.lnk")
If NOT @Error Then ShellExecute($aLink[0], "", $aLink[1])
        WinWaitActive ( "Testoste" )
    WinSetOnTop("Testoste) -", "", 1)
    send( "{enter}" )
Winwaitactive ( "SS_Client" )
WinSetOnTop("SS_Client", "", 1)
Sleep( 20000 )

is there anything i done wrong?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...