Jump to content

A little help


James
 Share

Recommended Posts

HI,

If WinExists("- Conversation") Then

WinActivate("- Conversation")

Send(IniRead("Text.ini", "MSN Text", "TXT"," Not Found") & "{enter}")

WinClose("- Conversation")

EndIf

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

OK, why is this not working?

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $help
            SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT")
            Sleep(10000)
            SplashOff()
        Case $setText
            IniWrite("Text.ini", "MSN Text", "TXT", InputBox("What text should be entered?", "Type : ", "", "", 200, 50) )   
        Case $start
            For $i = 1 to 100
        If WinExists("- Conversation") Then
            WinActivate("- Conversation")
            Send(IniRead("Text.ini", "MSN Text", "TXT"," Not Found") & "{enter}")
            WinClose("- Conversation")
        Else
            WinWaitActive("- Conversation")
            $start
        EndIf
        Next
    EndSwitch
WEnd

The code will only work if the windows are open, but I need it to work if a window pops up after one has closed.

Link to comment
Share on other sites

I fixed it.

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $help
            SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT")
            Sleep(10000)
            SplashOff()
        Case $setText
            IniWrite("Text.ini", "MSN Text", "TXT", InputBox("What text should be entered?", "Type : ", "", "", 200, 50) )   
        Case $start
            For $i = 1 to 100
            WinWaitActive("- Conversation")
        If WinExists("- Conversation") Then
            WinActivate("- Conversation")
            Send(IniRead("Text.ini", "MSN Text", "TXT"," Not Found") & "{enter}")
            WinClose("- Conversation")
        EndIf
        Next
    EndSwitch
WEnd

Forgot to add the win wait.

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