Jump to content

I follow the tutorial, but my script not work


Recommended Posts

I'm not sure why script not work? or write wrong.

Run("XoftSpySE426_183.exe")

WinWaitActive("Open File - Security Warning")

Send("!r")

WinWaitActive("XoftSpySE Setup")

Send("!n")

Please help me

Thank you very much.

Link to comment
Share on other sites

Hi,

try this.

Opt("WinTitleMatchMode", 4)
Global $return = Run("XoftSpySE426_183.exe")
If $return <> 0 Then
    If WinWaitActive("Open File - Security Warning", "", 3) = 1 Then
        Send("!r")
        MsgBox(0, "Info", "!r was sent")
    Else
        MsgBox(0, "Error", "Couldn't find the Open File Window")
    EndIf
    If WinWaitActive("XoftSpySE Setup", "", 3) = 1 Then
        Send("!n")
        MsgBox(0, "Info", "!n was sent")
    Else
        MsgBox(0, "Error", "Couldn't find the XoftSpySE Setup Window")
    EndIf
Else
    MsgBox(0, "Error", "Didn't find the exe")
EndIf
Exit(0)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

try this.

Opt("WinTitleMatchMode", 4)
Global $return = Run("XoftSpySE426_183.exe")
If $return <> 0 Then
    If WinWaitActive("Open File - Security Warning", "", 3) = 1 Then
        Send("!r")
        MsgBox(0, "Info", "!r was sent")
    Else
        MsgBox(0, "Error", "Couldn't find the Open File Window")
    EndIf
    If WinWaitActive("XoftSpySE Setup", "", 3) = 1 Then
        Send("!n")
        MsgBox(0, "Info", "!n was sent")
    Else
        MsgBox(0, "Error", "Couldn't find the XoftSpySE Setup Window")
    EndIf
Else
    MsgBox(0, "Error", "Didn't find the exe")
EndIf
Exit(0)

So long,

Mega

Hi,

Your script good idea but experiment run it do not work and stop at this step.

gaga

Link to comment
Share on other sites

Hi,

Your script good idea but experiment run it do not work and stop at this step.

gaga

Did you get the message box that it couldn't find that window? The problem could be that the window is created without getting activated. You could look for windows to exist, then activate them:

Global $return = Run("XoftSpySE426_183.exe")
If $return <> 0 Then
    If WinWait("Open File - Security Warning", "", 3) Then
        WinActivate("Open File - Security Warning")
        Sleep(100)
        Send("!r")
        MsgBox(0, "Info", "!r was sent")
    Else
        MsgBox(0, "Error", "Couldn't find the Open File Window")
    EndIf
    If WinWait("XoftSpySE Setup", "", 3) Then
        WinActivate("XoftSpySE Setup")
        Sleep(100)
        Send("!n")
        MsgBox(0, "Info", "!n was sent")
    Else
        MsgBox(0, "Error", "Couldn't find the XoftSpySE Setup Window")
    EndIf
Else
    MsgBox(0, "Error", "Didn't find the exe")
EndIf

Hope that helps! :D

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

:D I meet that it not can work is correct if run my script on the network system and sorry at no tell the detail.

:"> However , now it has can work already with basic command on standalone pc.

Thank you very much , for the assistance.

gaga

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