Jump to content

Recommended Posts

Posted

Here's my code:

While 1

$msg = GUIGetMsg()

Select

Case $msg = $button1

Run("C:\Program Files\Perfect Keyboard PRO\pk32.exe")

WinWait("Perfect Keyboard PRO Evaluation")

ControlClick ( "Perfect Keyboard PRO Evaluation", "Insert registration info...", 1001 )

WinWait("Register")

Send("Temporary{TAB}000014-J3UDDJ-1AM8GU-06Q7D9-CKE80G-RM2M81-VMVHD8-3QPZ20-PG882W-8KA903{ENTER}")

WinWait("Perfect Keyboard PRO")

Send("{ENTER}")

Case $msg = $button2

WinActivate("K.P. Control Panel")

WinWait("K.P. Control Panel")

Send("test{SPACE}")

GuiSetState ()

Case $msg = $button3

Send("//b{SPACE}")

Case $msg = $button4

WinActivate("Diablo II")

WinWait("Diablo II")

Send("//c{SPACE}")

Case $msg = $button5

WinActivate("Diablo II")

WinWait("Diablo II")

Send("//d{SPACE}")

Case $msg = $button6

Send("//e{SPACE}")

Case $msg = $button7

Send("//f{SPACE}")

EndSelect

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

When I click on a button it works but once it sends the keys it keeps repeating that part.

Am I missing something to make it stop?

Posted (edited)

put the code inside [ autoit ] tags, and run tidy on that code, then edit :whistle: >.< what you have now just makes my head hurt ;)

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

put the code inside [ autoit ] tags, and run tidy on that code, then edit :whistle: >.< what you have now just makes my head hurt ;)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $button1
            Run("C:\Program Files\Perfect Keyboard PRO\pk32.exe")
            WinWait("Perfect Keyboard PRO Evaluation")
            ControlClick ( "Perfect Keyboard PRO Evaluation", "Insert registration info...", 1001 )
            WinWait("Register")
            Send("Temporary{TAB}000014-J3UDDJ-1AM8GU-06Q7D9-CKE80G-RM2M81-VMVHD8-3QPZ20-PG882W-8KA903{ENTER}")
            WinWait("Perfect Keyboard PRO")
            Send("{ENTER}")
        Case $msg = $button2
            WinActivate("K.P. Control Panel")
            WinWait("K.P. Control Panel")
            Send("test{SPACE}")
            GuiSetState ()
        Case $msg = $button3
            Send("//b{SPACE}")
        Case $msg = $button4
            WinActivate("Diablo II")
            WinWait("Diablo II")
            Send("//c{SPACE}")
        Case $msg = $button5
            WinActivate("Diablo II")
            WinWait("Diablo II")
            Send("//d{SPACE}")
        Case $msg = $button6
            Send("//e{SPACE}")
        Case $msg = $button7
            Send("//f{SPACE}")
    EndSelect
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Indented and such...

Mind posting the rest of the code? This doesn't look like there is any problem

Posted

By the way I haven't used this forum much, do I just click the # button at reply to put that in [autoit]?

no, the button to the right of it that says A3

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted (edited)

By the way I haven't used this forum much, do I just click the # button at reply to put that in [autoit]?

you mark your code and click the A³ icon.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

By the way I haven't used this forum much, do I just click the # button at reply to put that in [autoit]?

Posted Image :
::  : [autoit]
Posted

you mark you code and click the A³ icon.

Cheers

Kurt

how did you get that superscript 3?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

#include <GuiConstants.au3>

; GUI
GuiCreate("K.P. Control Panel", 1200, 335)
GuiSetIcon(@SystemDir & "\au3.exe", 0)

; TAB
GuiCtrlCreateTab(10, 10, 400, 22)
GuiCtrlCreateTabItem("Startup")
$button1 = GuiCtrlCreateButton("Start PKP", 10, 50, 120, 30)
$button2 = GuiCtrlCreateButton("Position GUI", 10, 100, 120, 30)
$button3 = GuiCtrlCreateButton("Start Diablo II", 10, 150, 120, 30)
$button4 = GuiCtrlCreateButton("Move Window", 150, 150, 120, 30)
$button5 = GuiCtrlCreateButton("Log In", 290, 150, 120, 30)
$button6 = GuiCtrlCreateButton("Start mIRC", 10, 200, 120, 30)
$button7 = GuiCtrlCreateButton("Start Maphack", 150, 200, 120, 30)
GuiCtrlCreateTabItem("Chat")
GuiCtrlCreateTabItem("Game")
GuiCtrlCreateTabItem("Text")
GuiCtrlCreateTabItem("Animation")
GuiCtrlCreateTabItem("Computer")
GuiCtrlCreateTabItem("Music")
GuiCtrlCreateTabItem("Vehementi")
GuiCtrlCreateTabItem("Suvirra")
GuiCtrlCreateTabItem("")

GuiSetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
       Select
       Case $msg = $button1
            Run("C:\Program Files\Perfect Keyboard PRO\pk32.exe")
            WinWait("Perfect Keyboard PRO Evaluation")
            ControlClick ( "Perfect Keyboard PRO Evaluation", "Insert registration info...", 1001 )
            WinWait("Register")
            Send("Temporary{TAB}000014-J3UDDJ-1AM8GU-06Q7D9-CKE80G-RM2M81-VMVHD8-3QPZ20-PG882W-8KA903{ENTER}")
            WinWait("Perfect Keyboard PRO")
            Send("{ENTER}")
        Case $msg = $button2
            WinActivate("K.P. Control Panel")
            WinWait("K.P. Control Panel")
             Send("test{SPACE}")
             GuiSetState ()
        Case $msg = $button3
             Send("//b{SPACE}")
        Case $msg = $button4
           WinActivate("Diablo II")
           WinWait("Diablo II")
             Send("//c{SPACE}")
        Case $msg = $button5
           WinActivate("Diablo II")
           WinWait("Diablo II")
             Send("//d{SPACE}")
        Case $msg = $button6
             Send("//e{SPACE}")
        Case $msg = $button7
           Send("//f{SPACE}")
           
      EndSelect
   If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

That's my whole code, just a GUI with buttons.

Button 1 seems to work right but Send("//{SPACE}") keeps repeating.

Should it type this in a notepad maybe?

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
  • Recently Browsing   0 members

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