Sign in to follow this  
Followers 0
onedayillpay

case $msg = $move

10 posts in this topic

i dont understand why the secnd time you enter 2 into the input and click Move, why the merlin.gif wont go back to were it was

#include <GuiConstants.au3>
GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$pic2_left = 150
$pic2_top = 20
$Pic_2 = GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",$pic2_left,$pic2_top, 60, 60)
$freespotLeft = 150
$freespotTop = 90
$input = GUICtrlCreateInput ("", 170,  240, 20, 20)
$move = GUICtrlCreateButton("Move", 160, 260, 40, 20, 0)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $move
        if GUICtrlRead($Input) = "2" then
            if $freespotLeft = 150 Then
                if $freespotTop = 90 Then
                    if $pic2_left = 150 Then
                        if $pic2_top = 20 Then
                        $pic2_left = 150
                        $pic2_top = 90
                        $freespotLeft = 150
                        $freespotTop = 20
                        GUICtrlSetPos ($Pic_2,$pic2_left,$pic2_top)
                        EndIf
                    EndIf
                EndIf
             EndIf
         EndIf
        
    Case $msg = $move
        if GUICtrlRead($Input) = "2" then
            if $freespotLeft = 150 Then
                if $freespotTop = 20 Then
                    if $pic2_left = 150 Then
                        if $pic2_top = 90 Then
                        $pic2_left = 150
                        $pic2_top = 20
                        $freespotLeft = 150
                        $freespotTop = 90
                        GUICtrlSetPos ($Pic_2,$pic2_left,$pic2_top)
                        EndIf
                    EndIf
                EndIf
            EndIf
        EndIf
        

    
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i dont understand why the secnd time you enter 2 into the input and click Move, why the merlin.gif wont go back to were it was

The second "Case $msg = $move" will never be done because only the first TRUE case is performed..:

Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $move
        If GUICtrlRead($Input) = "2" Then
            If $freespotLeft = 150 And $freespotTop = 90 And $pic2_left = 150 And $pic2_top = 20 Then
                $pic2_left = 150
                $pic2_top = 90
                $freespotLeft = 150
                $freespotTop = 20
                GUICtrlSetPos($Pic_2, $pic2_left, $pic2_top)
            EndIf
            If $freespotLeft = 150 And $freespotTop = 20 And $pic2_left = 150 And $pic2_top = 90 Then
                $pic2_left = 150
                $pic2_top = 20
                $freespotLeft = 150
                $freespotTop = 90
                GUICtrlSetPos($Pic_2, $pic2_left, $pic2_top)
            EndIf
        EndIf
EndSelect
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

there will be about 135 sections of code like this

if GuiCtrlread($input) = "#" and $freespotLeft = "#" And $freespotTop = "#" And $pic2_left = "#" And $pic2_top = "#" Then
$pic2_left = "#"
$pic2_top = "#"
$freespotLeft = "#"
$freespotTop = "#"
GUICtrlSetPos($Pic_2, $pic2_left, $pic2_top)
$input = GUICtrlCreateInput ("", 170,  240, 20, 20)
$sleep(1000)oÝ÷ Ú'ׯz¸¶Ø^±ç'vǶ*'¡ûayƬzÚ+zÊhÖ®¶­s`¥vÆR b33c¶×6rÒwVvWD×6r¥6VÆV7@¢66Rb33c¶×6rÒb33c´uTôUdTåEô4Äõ4P¢WDÆö÷¢66Rb33c¶×6rÒb33c¶Ö÷fP ¢buT7G&Å&VBb33c´çWBÒgV÷C³"gV÷C²æBb33c¶g&VW7÷DÆVgBÒSæBb33c¶g&VW7÷EF÷ÒæBb33c·3%öÆVgBÒSæBb33c·3%÷F÷Ò#FVà b33c·3%öÆVgBÒS¢b33c·3%÷F÷Ò¢b33c¶g&VW7÷DÆVgBÒS¢b33c¶g&VW7÷EF÷Ò#¢uT7G&Å6WE÷2b33cµ5ó"Âb33c·3%öÆVgBÂb33c·3%÷F÷ b33c¶çWBÒuT7G&Ä7&VFTçWBgV÷C²gV÷C²ÂsÂ#CÂ#Â# 6ÆVW VÇ6P buT7G&Å&VBb33c´çWBÒgV÷C³"gV÷C²æBb33c¶g&VW7÷DÆVgBÒSæBb33c¶g&VW7÷EF÷Ò#æBb33c·3%öÆVgBÒSæBb33c·3%÷F÷ÒFVà¢b33c·3%öÆVgBÒS¢b33c·3%÷F÷Ò#¢b33c¶g&VW7÷DÆVgBÒS¢b33c¶g&VW7÷EF÷Ò uT7G&Å6WE÷2b33cµ5ó"Âb33c·3%öÆVgBÂb33c·3%÷F÷ b33c¶çWBÒuT7G&Ä7&VFTçWBgV÷C²gV÷C²ÂsÂ#CÂ#Â# 6ÆVW¢VÇ6P  ¢¢VæD`¢VæD`¤VæE6VÆV7@¥tVæ@

so what im trying to do is... If $msg = $move then search for a section that is true...

i hope you understand me :">

Edited by onedayillpay

Share this post


Link to post
Share on other sites

i alwase do every thing improper... if you need me to show you more code or explain a little better...

Share this post


Link to post
Share on other sites

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$pic2_left = 150
$pic2_top = 20
$Pic_2 = GuiCtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif", $pic2_left,$pic2_top, 60, 60)
$freespotLeft = 150
$freespotTop = 90
$input = GUICtrlCreateInput ("", 170,  240, 20, 20)
$move = GUICtrlCreateButton("Move", 160, 260, 40, 20, 0)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        Case $msg = $move
        If GUICtrlRead($Input) = "2" Then
            If $freespotLeft = 150 And $freespotTop = 90 And $pic2_left = 150 And $pic2_top = 20 Then
                $pic2_left = 150
                $pic2_top = 90
                $freespotLeft = 150
                $freespotTop = 20
                GUICtrlSetPos($Pic_2, $pic2_left, $pic2_top)
            elseif $freespotLeft = 150 And $freespotTop = 20 And $pic2_left = 150 And $pic2_top = 90 Then
                $pic2_left = 150
                $pic2_top = 20
                $freespotLeft = 150
                $freespotTop = 90
                GUICtrlSetPos($Pic_2, $pic2_left, $pic2_top)
            EndIf
        EndIf
EndSelect
WEnd
Exit



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

looks to me like your making a game

but what is the freespot's for i deleated everything with freespot's and it still worked

good luck

Edited by toothyXdip

---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I just finished, and after about 1200 lines of scriptting and hard concentration, stand back kids, this is the game you have all been waiting for...

Blah.. blAh.. bLAh..

The folder must be extracted to your desk top for the program to find the pictures

lol can some one help me out with one more problem...

the scramble button...

..... this was my first gui .....

Edited by onedayillpay

Share this post


Link to post
Share on other sites

can some one re script this and try to keep it under 100 lines... i have a good idea, A 3D rubic cube

Share this post


Link to post
Share on other sites

umm what is the point of the game?

to get them 9-1


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

hmm . . . What is the point of the game....

its missing a scrambler func... so yea after its scrambled you have to try to get them 1 threw 9

its my first gui so be nice.... when i find a program that will resize a picture to the correct size to take the plaze of the mirlens.

...TEL ME Good Job... :whistle:

Edited by onedayillpay

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