Jump to content

3.1.0 GUI Control Styles ?


n9mfk9
 Share

Recommended Posts

I was use this code with a bata then went to 3.10

this is my old code that I get a error with in 3.10 how wood i change this part of the code to make it work

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

thanks beau

here is th full script

#include <GuiConstants.au3>

Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, ;$WS_CLIPSIBLINGS = 0x04000000 ,$ES_NUMBER=0x2000

$a = IniRead(@ScriptDir&"\races.ini", "setup", "copies", "5")

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($a, 130, 140, 25, 20,$ES_NUMBER)

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

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

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

$exit = GuiCtrlCreateButton("exit", 230, 250, 100, 40)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $Submit

ExitLoop

Case $msg = $exit OR $msg = $GUI_EVENT_CLOSE

$ans = MsgBox(4, "Quit?", "Are you sure you want to quit?")

if $ans = 6 then exit

EndSelect

WEnd

$test1 = ProcessExists("msimn.exe")

if $test1 = 0 then

$ans1 = MsgBox(4, "Quit?", "Outlook express is not running please start it now.")

if $ans1 = 6 then Run("C:\Program Files\Outlook Express/msimn.exe", "", @SW_MAXIMIZE)

if $ans1 = 7 then exit

EndIf

BlockInput(1)

$window4= "Inbox - Outlook Express - Main Identity"

$window5= "Inbox - Outlook Express - races"

$test3 = WinExists($window4)

if $test3 = 1 then WinActivate($window4, "", )

if $test3 = 0 then WinActivate($window5, "", )

;WinActivate($window4, "", )

Sleep(3000)

$test2 = WinGetTitle("Inbox - Outlook Express - Main Identity", "")

IF $test2 = "Inbox - Outlook Express - Main Identity" THEN

send("!F")

send("S")

WinWaitActive("Switch Identities")

send("R")

send("{ENTER}")

endif

$window1 = "Inbox - Outlook Express - races"

$window2 = "New Message"

$window3 = "Races"

;$state = WinGetState($window1, "")

;If BitAnd($state, 32) Then

;WinSetState($window1, "", @SW_MINIMIZE )

;EndIf

;WinActivate($window1, "", )

For $number = 1 To GUICtrlRead($copies)

GUISetState (@SW_MINIMIZE )

WinSetState($window1, "", @SW_MAXIMIZE )

WinWaitActive($window1)

Send("^n")

WinWaitActive($window2)

send("Races members "&$number)

Send("{TAB 2}")

send("Races")

WinWaitActive($window3)

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", GUICtrlRead($Date))

WinWaitActive($window3)

send ($line & @cr)

Wend

FileClose($file)

WinWaitActive($window3)

send("!o")

send("b")

send("c")

send("{DOWN 8}")

send("{ENTER}")

WinSetState($window3, "", @SW_MINIMIZE )

next

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