Sign in to follow this  
Followers 0
Coder_Noob

Whats wrong with this code?

5 posts in this topic

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 355, 63,(@DesktopWidth-355)/2, (@DesktopHeight-63)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Input_1 = GuiCtrlCreateInput("Type Here!", 60, 10, 180, 20)
$Button_2 = GuiCtrlCreateButton("Go", 250, 10, 100, 20)
$Label_3 = GuiCtrlCreateLabel("Enter the name of a Window (E.G AOL 9.0) and click go", 60, 40, 290, 20)
$Icon_4 = GuiCtrlCreateIcon("Ico1", 0, 10, 10, 32, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    Case $guimsg = $Button_2
    while 1
    $Proc WinGetProcess($Input_1)
    tooltip($Proc)
    sleep(100)
    wend
    EndSelect
WEnd
Exit

When i click 'Go' nothing happens, whats wrong?


Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
Share on other sites



#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 355, 63,(@DesktopWidth-355)/2, (@DesktopHeight-63)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Input_1 = GuiCtrlCreateInput("Type Here!", 60, 10, 180, 20)
$Button_2 = GuiCtrlCreateButton("Go", 250, 10, 100, 20)
$Label_3 = GuiCtrlCreateLabel("Enter the name of a Window (E.G AOL 9.0) and click go", 60, 40, 290, 20)
$Icon_4 = GuiCtrlCreateIcon("Ico1", 0, 10, 10, 32, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;
    Case $guimsg = $Button_2
    while 1
    $Proc WinGetProcess($Input_1)
    tooltip($Proc)
    sleep(100)
    wend
    EndSelect
WEnd
Exit

When i click 'Go' nothing happens, whats wrong?

your case else is being called, and doing nothing, so the select structure exits before the button case. remove the case else if it does nothing, or move it below the case for the button.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 355, 63,(@DesktopWidth-355)/2, (@DesktopHeight-63)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Input_1 = GuiCtrlCreateInput("Type Here!", 60, 10, 180, 20)
$Button_2 = GuiCtrlCreateButton("Go", 250, 10, 100, 20)
$Label_3 = GuiCtrlCreateLabel("Enter the name of a Window (E.G AOL 9.0) and click go", 60, 40, 290, 20)
$Icon_4 = GuiCtrlCreateIcon("Ico1", 0, 10, 10, 32, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;
    Case $guimsg = $Button_2
    while 1
    $Proc WinGetProcess($Input_1)
    tooltip($Proc)
    sleep(100)
    wend
    EndSelect
WEnd
Exit

When i click 'Go' nothing happens, whats wrong?

Case $guimsg = $Button_2

Case $msg = $Button_2

Edit:

Remove the Case Else as camerons dad suggested and:

$Proc WinGetProcess($Input_1)

Is probably going to thro an error too... no '=' sign. Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Case $msg = $Button_2

Is probably going to thro an error too... no '=' sign.

good eye. i found one issue and stopped looking...my bad

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

ty!


Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
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
Sign in to follow this  
Followers 0