Jump to content

autoit 3.0.103 gui ?


n9mfk9
 Share

Recommended Posts

i have a gui i made with autoie 3.0.102 using autoixp

EnvSet("GUI","title=My InputBox Title|focus=2|action=1|file=races.ini")

EnvSet("OBJ1","type=label|text=date")

Envset("OBJ2","type=combo|x=25|y=1|w=35|data=01;02;03;04;05;06;07;08;09;10;11;12;13;14;16;16;17;18;19;20;21;22

;23;24;25;26;27;28;29;30;31")

EnvSet("OBJ3","type=label|text=Number of copys|x=5|y=30|w=80|h=20")

$ES_NUMBER = 0x2000

EnvSet("OBJ4","type=input|text=5|x=90|y=30|w=25|h=20|style=" & $ES_NUMBER)

EnvSet("OBJ5","type=button|text=&Submit|x=160|y=250|submit=1|close=1")

RunWait("au3guixp")

what the way to covert this in to autoit 3.0.103

i can not find any info on action=1|file=races.ini

in the help file in any of the gui info

thanks for any help

Link to comment
Share on other sites

...

The sintax of that language seems readable as telephonic signals.

I am afraid that no automatic conversion are possibles.

What is the point of action=1|file=races.ini? If I can understand what is their meaning I can probably help you.

Edited by ezzetabi
Link to comment
Share on other sites

What ezzetabi is saying is that there is nothing to automatically do this for you. You will need to completely rewrite the script from scratch using the new .103 features.

<{POST_SNAPBACK}>

ok i should have been clearer

in the script i posted when you click the submit buttion in the gui it puts

the data entered in the gui in a ini file what commadns are used in a 103 gui to do this thanks beau

Link to comment
Share on other sites

Here's about as close a literal translation there is:

GuiCreate("My InputBox Title")
$obj1 = GuiCtrlCreateLabel("date", 0, 0)
$obj2 = GuiCtrlCreateCombo("", 25, 1, 35, 20)
   GuiCtrlSetData($obj2, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|16|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31")
$obj3 = GuiCtrlCreateLabel("Number of copies", 5, 30, 88, 20)
$ES_NUMBER = 0x2000
$obj4 = GUICtrlCreateInput("5", 90, 30, 25, 20, $ES_NUMBER)
$obj5 = GuiCtrlCreateButton("Submit", 160, 250)

GuiSetState(@SW_SHOW)

While 1
   $msg = GuiGetMsg()
  ;The -3 is a magic number for GUI_EVENT_CLOSE... 
  ;you should really use the variable
  ; but I'm lazy;)
   If $msg = -3 Or $msg = $obj5 Then ExitLoop
WEnd

MsgBox(4096,"Info","The number of copies is " & GuiRead($obj4) )

Here's a rough alternative:

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, $WS_CLIPSIBLINGS = 0x04000000

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

GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30)
$Copies = GuiCtrlCreateInput("5", 130, 140, 30, 20)

GuiCtrlCreateLabel("Date", 20, 50, 80, 20)
$Date = GuiCtrlCreateDate("", 110, 50, 230, 20)

$Submit = GuiCtrlCreateButton("Submit", 150, 250, 100, 40)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Submit
        ExitLoop
    EndSelect
WEnd

MsgBox(4096,"Info", "Date is " & GuiRead($Date))
Exit
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

hI cyberslug

i like this code i have one ? insted of doing a exit

how wood exit the gui after sumit is hit

becuse i wet to add mor the the script to use the dat entered

thanks

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, $WS_CLIPSIBLINGS = 0x04000000

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

GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30)

$Copies = GuiCtrlCreateInput("5", 130, 140, 30, 20)

GuiCtrlCreateLabel("Date", 20, 50, 80, 20)

$Date = GuiCtrlCreateDate("", 110, 50, 230, 20)

$Submit = GuiCtrlCreateButton("Submit", 150, 250, 100, 40)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Submit

ExitLoop

EndSelect

WEnd

MsgBox(4096,"Info", "Date is " & GuiRead($Date))

Exit

Link to comment
Share on other sites

#include <GuiConstants.au3>
Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, $WS_CLIPSIBLINGS = 0x04000000

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

GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30)
$Copies = GuiCtrlCreateInput("5", 130, 140, 30, 20)

GuiCtrlCreateLabel("Date", 20, 50, 80, 20)
$Date = GuiCtrlCreateDate("", 110, 50, 230, 20)

$Submit = GuiCtrlCreateButton("Submit", 150, 250, 100, 40)

GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Submit
ExitLoop
EndSelect
WEnd

MsgBox(4096,"Info", "Date is " & GuiRead($Date))
GUIDelete()

;Rest of your script...

Link to comment
Share on other sites

thanks

do you hapen to know on a inptbox in a gui

how to make ahure that so that it only except text

thanks

<{POST_SNAPBACK}>

Check out "StringIsAlpha" in the help file :idiot:

We have enough youth. How about a fountain of SMART?

Link to comment
Share on other sites

ok i am stuck here is all code

if i run gui code it an click sumit

the gui closes

but if i run the hole code whin i click sumit the gui stays open

but then if i click the mouse on outlook express

the rest of script runs

so my question is what did i miss

thanks

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, $WS_CLIPSIBLINGS = 0x04000000

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

GuiCtrlCreateLabel("Number of copies", 30, 140, 90, 30)

$Copies = GuiCtrlCreateInput("5", 130, 140, 30, 20)

GuiCtrlCreateLabel("Date", 20, 50, 80, 20)

$Date = GuiCtrlCreateDate("", 110, 50, 230, 20)

$Submit = GuiCtrlCreateButton("Submit", 150, 250, 100, 40)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Submit

ExitLoop

EndSelect

WEnd

WinWaitActive("Inbox - Outlook Express - Main Identity")

WinSetState("Inbox - Outlook Express - Main Identity", "", @SW_MAXIMIZE )

$output = GuiRead($Date)

For $number = 1 To GuiRead($copies)

WinSetState("Inbox - Outlook Express - Main Identity", "", @SW_MAXIMIZE )

WinWaitActive("Inbox - Outlook Express - Main Identity")

Send("^n")

WinWaitActive("New Message")

send("Races members "&$number)

Send("{TAB 2}")

send("Races")

WinWaitActive("Races")

send("{tab}")

$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

; Read in lines of text until the EOF is reached

While 1

$line = FileReadline($file)

If @error = -1 Then ExitLoop

$line = StringReplace($line, "date", $output )

send ($line & @cr)

Wend

FileClose($file)

send("!o")

send("b")

send("c")

send("{DOWN 8}")

send("{ENTER}")

WinSetState("Races", "", @SW_MINIMIZE )

next

Link to comment
Share on other sites

  • Developers

ok i am stuck here is all  code

if i run gui code it an click sumit

the gui closes

but if i run the hole code whin i click sumit the gui stays open

but then if i click the mouse on outlook express

the rest of script runs

so my question is what did i miss

thanks

-snip-

WinWaitActive("Inbox - Outlook Express - Main Identity")

WinSetState("Inbox - Outlook Express - Main Identity", "", @SW_MAXIMIZE )

<{POST_SNAPBACK}>

Your script will on Submit and GuiClose exit the loop and continue till the WinWaitActive() statement. Your script will pause until the Outlook express window is getting the focus (Is activated).

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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