Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all 12506 articles
Browse latest View live

Detect System Tray ToolTip Pop-up

$
0
0

I am writing a script that will detect when headphones are plugged into/unplugged from my laptop so that I can mute/unmute the master volume when these events occur.  The audio driver provides a tooltip notification in the system tray when a plug/unplug event occurs.  Maddeningly, it does not provide a mechanism to mute/unmute based on this event.

 

I have used Window Info to get the class and title of the popup tooltip.  However, when I try to use this information in WinExists or WinWaitActive, the window is never found.  I have written a test script using WinList to enumerate all windows and that tooltip never appears in the active window list.

 

Here is the script I am trying to run for now on my Windows 8 laptop.  The message box never fires.

 

The other threads I have found regarding this issue make it seem like this should be pretty straightforward.  Anyone have any pointers or advice?

 

$windowtitle = "[TITLE:You just plugged a device into the audio jack.;CLASS:tooltips_class32]"
$windowtext = ""
 
Do
   If WinExists($windowtitle, $windowtext) Then
      MsgBox(0,"Unplugged","The headphones were unplugged.")
   EndIf
Until 0 = 1
 
And here is the Window Info:
 
Screenshot%202014-03-11%2017.22.29.jpg
Edit: The image is hosted on my Dropbox and  doesn't appear to work inline, but you should be able to open it in a new window/tab.  Sorry.

Progress Bar | Help

$
0
0

Hi, I'm trying to see if it is possible to get a task bar icon with a progress bar

 

taskbar.jpg

 

Here what kind of progress bar I am using,

Func Example()     ; Display a progress bar window.     ProgressOn("Countdown Timer", "Countdown Timer", "0%",1,1,18)    ; Update the progress value of the progress bar window every second.     For $i = 1 To 100 Step 1         Sleep(1000)         ProgressSet($i, $i & "%")     Next    ; Set the "subtext" and "maintext" of the progress bar window.     ProgressSet(100, "Done", "Complete")     Sleep(5000)     ; Close the progress window.     ProgressOff() EndFunc   ;==>Example

Thank you so much for your help and support!!

Just starting out...

$
0
0

Alright, so since my last first project was scrapped since I didn't read the rules I came up with a new project.

 

I am checking out Kodo which is kinda cool and decided I would like to make a fully functional CMS and website monitor. I am going to make specific php files just to incorporate with this program and what not, I think it will be pretty cool if my idea pans out completely.

 

Since I am better at web development I was thinking of having it load the actual webpage in IEFrames but I got no idea how to incorporate that into the program since everything seems to run off fetch functions. Is there a way to display a web page via a form on AutoIt?

 

Last part of this is one that does fall under the rules category a little so if it does just ignore it. I also want to plus this program into the actual server via ssh in order to get general stats of my server updated every couple minutes. Does this have the ability to interact with SSH?

Check if 32 or 64 bit

$
0
0

How to check if an exe is 32 or 64 bit. I want to check OS version and Arch on an offline drive. I've got this but I'd like something better. I don't think FileGetVersion can do this and what about something like an AutoIt compiled exe or a dll.

                $version = StringLeft(FileGetVersion(GUICtrlRead($Combo1) & "\Windows\system32\WinVer.exe"), 3)                 If StringLeft($version, 3) = "6.1" Then                     $version = "WIN7"                 ElseIf StringLeft($version, 3) = "6.0" Then                     $version = "VISTA"                 ElseIf StringLeft($version, 3) = "5.1" Then                     $version = "XP"                 EndIf                 $arch = (GUICtrlRead($Combo1) & "\Program Files (x86)")                 If Not FileExists($arch) Then                     $arch = "_x86"                 ElseIf FileExists($arch) Then                     $arch = "_x64"                 EndIf

Embedded DOS window

$
0
0

Hello,

i made looping DOS script, that run few small batches.

Main script do things, create and stop processes, etc. Works well.

 

Now, my colleaugues and my boss, want a windows interface because we are in 2014,

DOS script are dead (!) and other rubbish like this...

 

I want to allow people that using this script to stop/start, monitor processes, make maintenance,

directly from GUI, and not from command line.

 

My question, is possibile to embed DOS window in a gui ?

 

So i can maintain script as is, and allow 'modern people' to push mouse button.

 

I know it's stupid task, but can be usefull in some cases.

 

thank you for any help,

m.

_StringBetween getting error

$
0
0

I am trying to run this code:

$oIE = _IECreate("https://twitter.com/"&$link,1,0)   $oInputs = _IETagNameGetCollection($oIE, "a") For $oInput In $oInputs     If $oInput.className() = "js-nav" Then         If StringInStr($oInput.innerHTML(), 'Volgers') Then             ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF)             ExitLoop         EndIf     EndIf Next $numbvolgers = (_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF)

the error:

AutoIt         
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\joesoef pc\Desktop\autoit\youtube.au3" /UserParams     +>11:30:21 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0413  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64) >Running AU3Check (1.54.22.0)  from:C:\Program Files (x86)\AutoIt3 C:\Users\joesoef pc\Desktop\autoit\youtube.au3(136,69) : ERROR: syntax error             ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3(148,70) : ERROR: syntax error             ConsoleWrite(_StringBetween($oInput2.innerHTML(),'>','<')[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3(153,60) : ERROR: syntax error $numbvolgers = (_StringBetween($oInput.innerHTML(),'>','<')[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3(153,62) : ERROR: unbalanced paranthesis expression. $numbvolgers = (_StringBetween($oInput.innerHTML(),'>','<')[0] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3(154,61) : ERROR: syntax error $numbvolgend = (_StringBetween($oInput2.innerHTML(),'>','<')[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3(154,63) : ERROR: unbalanced paranthesis expression. $numbvolgend = (_StringBetween($oInput2.innerHTML(),'>','<')[0] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3(136,68) : ERROR: _StringBetween(): undefined function.             ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\joesoef pc\Desktop\autoit\youtube.au3 - 7 error(s), 0 warning(s) !>11:30:21 AU3Check ended. Press F4 to jump to next error.rc:2 +>11:30:21 AutoIt3Wrapper Finished.. >Exit code: 2    Time: 0.692

it seems the problem has to do with the string function,

 

I am  using autoit Version 3.3.7

because when i run version 3.3.10.2 firefox won't work any more

can somebody please help me with this.

Is this bug really fixed in version 3.3.10?

$
0
0

Hello,

 

before i compiled my script with autoit 3.3.10 , i compiled my script with autoit 3.3.8.

And with 3.3.8 i had these crashes several times each day (after a certain point in the development process):

http://support.microsoft.com/kb/2541119/en-us

 

After i compiled my script with 3.3.10, these crashes stop happen.

And I test it for over a week.

 

Is this a coincidence?
Or do you really've fixed this crash error?

 

I want to know. if you really've fixed it, the I can confirm that my problem was completely solved.

Can I make this code shorter?

$
0
0

I worked on this code for awhile trying to make it work and with some help from other people I finally finished it. I was just wondering if there is an easier way to type all this out, like could I have cut out 200-500 lines of code or is this the lowest you can get it and still have work the way it is. Any feedback would be nice :)

AutoIt         
#include <GUIConstantsEx.au3> Local $dicegui, $rpsgui, $rolled2d, $roll2d,$roll4d, $roll6d, $roll8d, $roll10d, $bal, $bankbal, $mb, $rolled4d, $rolled6d, $rolled8d, $rolled10d Local $12d, $22d, $14d, $24d, $34d, $44d, $16d, $26d, $36d, $46d, $56d, $66d, $18d, $28d, $38d, $48d, $58d, $68d, $78d, $88d, $110d, $210d, $310d, $410d, $510d, $610d, $710d, $810d, $910d, $1010d Local $reset, $choices, $bet, $tr, $dr ;Local $2nd, $3rd, $4th, $6th, $8th, $10th Local $rankup, $rank, $rankdisplay, $doublereward, $menu, $costdr, $gamereset, $triplereward Local $yourolled10,$yourolled8,$yourolled6,$yourolled4 Local $npcs, $goodluck, $rockrad, $paperrad, $srad, $yourchoice, $yourchoicepaper, $yourchoicescissor, $npcchose, $chose, $lose, $win, $choser, $goodluck2, $goodluck3, $rockrad2, $paperrad2, $srad2, $yourchoice2, $npcchose2, $npcchose3, $rockrad3, $yourchoice3, $npcpick2, $yourpick2, $npcpick3, $yourpick3, $paperrad3, $srad3 $hub = GUICreate("Main",300,100) $dice = GUICtrlCreateButton("Dice Game",15,40,125,30) $rps = GUICtrlCreateButton("Rock, Paper, Scissors",160,40,125,30) $label = GUICtrlCreateLabel("What Game Would You Like To Play?",35,0,1000) GUICtrlSetFont($label,10,700,2,"Minion Pro") GUISetState() while 1     $msg = GUIGetMsg(1)     Switch $msg[1]         Case $hub             Switch $msg[0]         Case -3             Exit          Case $dice             $2nd = "0"             $4th = "0"             $6th = "0"             $8th = "0"             $10th = "0"             Call("dicegame")         Case $rps             Call("rps")             ;MsgBox(0,"Under Work","Working on it at this very moment, should be out soon!")         EndSwitch         Case $dicegui             Switch $msg[0]         Case -3             Exit       Case $12d          GUICtrlSetState($12d,$GUI_DISABLE)          GUICtrlSetState($22d,$GUI_ENABLE)          $2nd = "1"       Case $22d          GUICtrlSetState($22d,$GUI_DISABLE)          GUICtrlSetState($12d,$GUI_ENABLE)          $2nd = "2"       Case $14d          GUICtrlSetState($14d,$GUI_DISABLE)          GUICtrlSetState($24d,$GUI_ENABLE)          GUICtrlSetState($34d,$GUI_ENABLE)          GUICtrlSetState($44d,$GUI_ENABLE)          $4th = "3"       Case $24d          GUICtrlSetState($24d,$GUI_DISABLE)          GUICtrlSetState($14d,$GUI_ENABLE)          GUICtrlSetState($34d,$GUI_ENABLE)          GUICtrlSetState($44d,$GUI_ENABLE)          $4th = "4"       Case $34d          GUICtrlSetState($34d,$GUI_DISABLE)          GUICtrlSetState($24d,$GUI_ENABLE)          GUICtrlSetState($14d,$GUI_ENABLE)          GUICtrlSetState($44d,$GUI_ENABLE)          $4th = "5"       Case $44d          GUICtrlSetState($44d,$GUI_DISABLE)          GUICtrlSetState($24d,$GUI_ENABLE)          GUICtrlSetState($34d,$GUI_ENABLE)          GUICtrlSetState($14d,$GUI_ENABLE)          $4th = "6"          Case $16d          GUICtrlSetState($16d,$GUI_DISABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          $6th = "7"       Case $26d          GUICtrlSetState($26d,$GUI_DISABLE)          GUICtrlSetState($16d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          $6th = "8"       Case $36d          GUICtrlSetState($36d,$GUI_DISABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($16d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          $6th = "9"       Case $46d          GUICtrlSetState($46d,$GUI_DISABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($16d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          $6th = "10"       Case $56d          GUICtrlSetState($56d,$GUI_DISABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($16d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          $6th = "11"       Case $66d          GUICtrlSetState($66d,$GUI_DISABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($16d,$GUI_ENABLE)          $6th = "12"          Case $18d          GUICtrlSetState($18d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "13"          Case $28d          GUICtrlSetState($28d,$GUI_DISABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "14"          Case $38d          GUICtrlSetState($38d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "15"          Case $48d          GUICtrlSetState($48d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "16"          Case $58d          GUICtrlSetState($58d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "17"          Case $68d          GUICtrlSetState($68d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "18"          Case $78d          GUICtrlSetState($78d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          $8th = "19"          Case $88d          GUICtrlSetState($88d,$GUI_DISABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          $8th = "20"          Case $110d          GUICtrlSetState($110d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "21"          Case $210d          GUICtrlSetState($210d,$GUI_DISABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "22"          Case $310d          GUICtrlSetState($310d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "23"          Case $410d          GUICtrlSetState($410d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "24"          Case $510d          GUICtrlSetState($510d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "25"          Case $610d          GUICtrlSetState($610d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "26"          Case $710d          GUICtrlSetState($710d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "27"          Case $810d          GUICtrlSetState($810d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "28"          Case $910d          GUICtrlSetState($910d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "29"          Case $1010d          GUICtrlSetState($1010d,$GUI_DISABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($110d,$GUI_ENABLE)          $10th = "30"               Case $reset                  If $rank > 0 Then          GUICtrlSetState($12d,$GUI_ENABLE)          GUICtrlSetState($22d,$GUI_ENABLE)          EndIf          If $rank > 4 Then          GUICtrlSetState($14d,$GUI_ENABLE)          GUICtrlSetState($24d,$GUI_ENABLE)          GUICtrlSetState($34d,$GUI_ENABLE)          GUICtrlSetState($44d,$GUI_ENABLE)          $4th = "0"       EndIf       If $rank > 9 Then          GUICtrlSetState($16d,$GUI_ENABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          $6th = "0"       EndIf       If $rank > 14 Then          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($18d,$GUI_ENABLE)          $8th = "0"       EndIf       If $rank > 19 Then          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          $10th = "0"       EndIf       Case $roll2d          If $bal >= "100" Then                If $dr = True Then                   $bet2d = "200"                   Else                $bet2d = "100"             EndIf             If $2nd = "1" Then                      $result2d = Random(1,2,1)                   GUICtrlSetData($rolled2d,$result2d)                If $result2d = 1 Then                   $bal = $bal + $bet2d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "100"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $2nd = "2" Then                      $result2d = Random(1,2,1)          GUICtrlSetData($rolled2d,$result2d)                If $result2d = 2 Then                   $bal = $bal + $bet2d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "100"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf          EndIf          Case $roll4d             If $bal >= "200" Then                If $dr = True Then                   $bet4d = "400"                   Else                $bet4d = "200"                EndIf             If $4th = "3" Then                      $result4d = Random(1,4,1)          GUICtrlSetData($rolled4d,$result4d)                If $result4d = 1 Then                   $bal = $bal + $bet4d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "200"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $4th = "4" Then                      $result4d = Random(1,4,1)          GUICtrlSetData($rolled4d,$result4d)                If $result4d = 2 Then                   $bal = $bal + $bet4d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "200"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $4th = "5" Then                      $result4d = Random(1,4,1)          GUICtrlSetData($rolled4d,$result4d)                If $result4d = 3 Then                   $bal = $bal + $bet4d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "200"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $4th = "6" Then                      $result4d = Random(1,4,1)          GUICtrlSetData($rolled4d,$result4d)                If $result4d = 4 Then                   $bal = $bal + $bet4d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "200"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             EndIf          Case $roll6d             If $bal >= "300" Then                If $dr = True Then                   $bet6d = "600"                   Else                $bet6d = "300"                EndIf             If $6th = "7" Then                      $result6d = Random(1,6,1)          GUICtrlSetData($rolled6d,$result6d)                If $result6d = 1 Then                   $bal = $bal + $bet6d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "300"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $6th = "8" Then                      $result6d = Random(1,6,1)          GUICtrlSetData($rolled6d,$result6d)                If $result6d = 2 Then                   $bal = $bal + $bet6d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "300"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $6th = "9" Then                      $result6d = Random(1,6,1)          GUICtrlSetData($rolled6d,$result6d)                If $result6d = 3 Then                   $bal = $bal + $bet6d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "300"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $6th = "10" Then                      $result6d = Random(1,6,1)          GUICtrlSetData($rolled6d,$result6d)                If $result6d = 4 Then                   $bal = $bal + $bet6d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "300"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $6th = "11" Then                      $result6d = Random(1,6,1)          GUICtrlSetData($rolled6d,$result6d)                If $result6d = 5 Then                   $bal = $bal + $bet6d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "300"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $6th = "12" Then                      $result6d = Random(1,6,1)          GUICtrlSetData($rolled6d,$result6d)                If $result6d = 6 Then                   $bal = $bal + $bet6d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "300"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             EndIf          Case $roll8d             If $bal >= "400" Then                If $dr = True Then                   $bet8d = "800"                   Else                $bet8d = "400"                EndIf             If $8th = "13" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 1 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "14" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 2 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "15" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 3 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "16" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 4 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "17" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 5 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "18" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 6 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "19" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 7 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $8th = "20" Then                      $result8d = Random(1,8,1)          GUICtrlSetData($rolled8d,$result8d)                If $result8d = 8 Then                   $bal = $bal + $bet8d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "400"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             EndIf          Case $roll10d             If $bal >= "500" Then                If $dr = True Then                   $bet10d = "1000"                   Else                $bet10d = "500"                EndIf             If $10th = "21" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 1 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "22" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 2 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "23" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 3 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "24" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 4 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "25" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 5 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "26" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 6 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "27" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 7 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "28" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 8 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "29" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 9 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf             If $10th = "30" Then                      $result10d = Random(1,10,1)          GUICtrlSetData($rolled10d,$result10d)                If $result10d = 10 Then                   $bal = $bal + $bet10d                   GUICtrlSetData($bankbal,"$"&$bal)                Else                   $bal = $bal - "500"                   GUICtrlSetData($bankbal,"$"&$bal)                EndIf             EndIf          EndIf       Case $doublereward          If $bal > "1500" Then             $dr = True             $bal = $bal - "1500"             GUICtrlSetData($bankbal,"$"&$bal)             GUICtrlSetState($doublereward,$GUI_CHECKED)             GUICtrlSetState($doublereward,$GUI_DISABLE)          Else             MsgBox(0,"","You need $1,500 sorry")          EndIf       Case $gamereset          GUIDelete($dicegui)          $2nd = "0"          $4th = "0"          $6th = "0"          $8th = "0"          $10th = "0"          $dr = False          $tr = False          Call("dicegame")          Case $rankup             If $bal > $rank * 250 Then          $rank = $rank + 1          $bal = $bal - ($rank * 250)          GUICtrlSetData($rankdisplay,$rank)          GUICtrlSetData($bankbal,"$"&$bal)       Else          MsgBox(0,"","You need more money to rank up! (Hint: Your rank * 250 is the cost)")       EndIf       If $rank > 0 Then          GUICtrlSetState($12d,$GUI_ENABLE)          GUICtrlSetState($22d,$GUI_ENABLE)          GUICtrlSetState($roll2d,$GUI_ENABLE)          EndIf          If $rank > 4 Then          GUICtrlSetState($14d,$GUI_ENABLE)          GUICtrlSetState($24d,$GUI_ENABLE)          GUICtrlSetState($34d,$GUI_ENABLE)          GUICtrlSetState($44d,$GUI_ENABLE)          GUICtrlSetState($roll4d,$GUI_ENABLE)          GUICtrlSetState($yourolled4,$GUI_SHOW)       EndIf       If $rank > 9 Then          GUICtrlSetState($16d,$GUI_ENABLE)          GUICtrlSetState($26d,$GUI_ENABLE)          GUICtrlSetState($36d,$GUI_ENABLE)          GUICtrlSetState($46d,$GUI_ENABLE)          GUICtrlSetState($56d,$GUI_ENABLE)          GUICtrlSetState($66d,$GUI_ENABLE)          GUICtrlSetState($roll6d,$GUI_ENABLE)          GUICtrlSetState($yourolled6,$GUI_SHOW)       EndIf       If $rank > 14 Then          GUICtrlSetState($18d,$GUI_ENABLE)          GUICtrlSetState($28d,$GUI_ENABLE)          GUICtrlSetState($38d,$GUI_ENABLE)          GUICtrlSetState($48d,$GUI_ENABLE)          GUICtrlSetState($58d,$GUI_ENABLE)          GUICtrlSetState($68d,$GUI_ENABLE)          GUICtrlSetState($78d,$GUI_ENABLE)          GUICtrlSetState($88d,$GUI_ENABLE)          GUICtrlSetState($roll8d,$GUI_ENABLE)          GUICtrlSetState($yourolled8,$GUI_SHOW)       EndIf       If $rank > 19 Then          GUICtrlSetState($110d,$GUI_ENABLE)          GUICtrlSetState($210d,$GUI_ENABLE)          GUICtrlSetState($310d,$GUI_ENABLE)          GUICtrlSetState($410d,$GUI_ENABLE)          GUICtrlSetState($510d,$GUI_ENABLE)          GUICtrlSetState($610d,$GUI_ENABLE)          GUICtrlSetState($710d,$GUI_ENABLE)          GUICtrlSetState($810d,$GUI_ENABLE)          GUICtrlSetState($910d,$GUI_ENABLE)          GUICtrlSetState($1010d,$GUI_ENABLE)          GUICtrlSetState($roll10d,$GUI_ENABLE)          GUICtrlSetState($yourolled10,$GUI_SHOW)          EndIf          EndSwitch         Case $rpsgui             Switch $msg[0]         Case -3             Exit             Case $doublereward          If $bal > "2500" Then             $dr = True             $bal = $bal - "2500"             GUICtrlSetData($bankbal,"$"&$bal)             GUICtrlSetState($doublereward,$GUI_CHECKED)             GUICtrlSetState($doublereward,$GUI_DISABLE)          Else             MsgBox(0,"","You need $2,500 sorry")          EndIf Case $rankup             If $bal > $rank * 250 Then          $rank = $rank + 1          $bal = $bal - ($rank * 250)          GUICtrlSetData($rankdisplay,$rank)          GUICtrlSetData($bankbal,"$"&$bal)       Else          MsgBox(0,"","You need more money to rank up! (Hint: Your rank * 250 is the cost)")       EndIf     If $rank > 4 Then        GUICtrlSetState($npcpick2,$GUI_SHOW)        GUICtrlSetState($yourpick2,$GUI_SHOW)        GUICtrlSetState($npcchose2, $GUI_SHOW)        GUICtrlSetState($yourchoice2, $GUI_SHOW)        GUICtrlSetState($goodluck2, $GUI_ENABLE)        GUICtrlSetState($rockrad2,$GUI_ENABLE)        GUICtrlSetState($paperrad2,$GUI_ENABLE)        GUICtrlSetState($srad2,$GUI_ENABLE)     EndIf     If $rank > 9 Then        GUICtrlSetState($npcpick3,$GUI_SHOW)        GUICtrlSetState($yourpick3,$GUI_SHOW)        GUICtrlSetState($npcchose3, $GUI_SHOW)        GUICtrlSetState($yourchoice3, $GUI_SHOW)        GUICtrlSetState($goodluck3, $GUI_ENABLE)        GUICtrlSetState($rockrad3,$GUI_ENABLE)        GUICtrlSetState($paperrad3,$GUI_ENABLE)        GUICtrlSetState($srad3,$GUI_ENABLE)        EndIf          Case $goodluck          If $bal > "0" Then             $npcs = Random(1,3,1)             If $npcs = 1 Then                $npcr = "Rock"             GUICtrlSetData($npcchose,$npcr)          EndIf          If $npcs = 2 Then             $npcp = "Paper"             GUICtrlSetData($npcchose,$npcp)          EndIf          If $npcs = 3 Then             $npcsc = "Scissor"             GUICtrlSetData($npcchose,$npcsc)          EndIf          If GUICtrlRead($rockrad) = 1 Then             $chose = "Rock"             $choser = 1             GUICtrlSetData($yourchoice,$chose)          EndIf          If GUICtrlRead($paperrad) = 1 Then             $chose = "Paper"             $choser = 2             GUICtrlSetData($yourchoice,$chose)          EndIf          If GUICtrlRead($srad) = 1 Then             $chose = "Scissor"             $choser = 3             GUICtrlSetData($yourchoice,$chose)          EndIf          If $npcs = 1 Then          If $choser = 1 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 2 Then                If $choser = 1 Then                   $bal = $bal - "200"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 3 Then                      If $choser = 1 Then                         If $dr = True Then                            $bal = $bal + "400"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "200"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                   EndIf                   If $npcs = 2 Then          If $choser = 2 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 3 Then                If $choser = 2 Then                   $bal = $bal - "200"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 1 Then                      If $choser = 2 Then                         If $dr = True Then                            $bal = $bal + "400"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "200"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                   EndIf                   If $npcs = 3 Then          If $choser = 3 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 1 Then                If $choser = 3 Then                   $bal = $bal - "200"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 2 Then                      If $choser = 3 Then                         If $dr = True Then                            $bal = $bal + "400"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "200"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                EndIf                EndIf          Case $goodluck2          If $bal > "0" Then             $npcs = Random(1,3,1)             If $npcs = 1 Then                $npcr = "Rock"             GUICtrlSetData($npcchose2,$npcr)          EndIf          If $npcs = 2 Then             $npcp = "Paper"             GUICtrlSetData($npcchose2,$npcp)          EndIf          If $npcs = 3 Then             $npcsc = "Scissor"             GUICtrlSetData($npcchose2,$npcsc)          EndIf          If GUICtrlRead($rockrad2) = 1 Then             $chose2 = "Rock"             $choser = 1             GUICtrlSetData($yourchoice2,$chose2)          EndIf          If GUICtrlRead($paperrad2) = 1 Then             $chose2 = "Paper"             $choser = 2             GUICtrlSetData($yourchoice2,$chose2)          EndIf          If GUICtrlRead($srad2) = 1 Then             $chose2 = "Scissor"             $choser = 3             GUICtrlSetData($yourchoice2,$chose2)          EndIf          If $npcs = 1 Then          If $choser = 1 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 2 Then                If $choser = 1 Then                   $bal = $bal - "400"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 3 Then                      If $choser = 1 Then                         If $dr = True Then                            $bal = $bal + "800"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "400"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                   EndIf                   If $npcs = 2 Then          If $choser = 2 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 3 Then                If $choser = 2 Then                   $bal = $bal - "200"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 1 Then                      If $choser = 2 Then                         If $dr = True Then                            $bal = $bal + "800"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "400"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                EndIf                   If $npcs = 3 Then          If $choser = 3 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 1 Then                If $choser = 3 Then                   $bal = $bal - "200"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 2 Then                      If $choser = 3 Then                         If $dr = True Then                            $bal = $bal + "800"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "400"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                EndIf                EndIf                Case $goodluck3          If $bal > "0" Then             $npcs = Random(1,3,1)             If $npcs = 1 Then                $npcr = "Rock"             GUICtrlSetData($npcchose3,$npcr)          EndIf          If $npcs = 2 Then             $npcp = "Paper"             GUICtrlSetData($npcchose3,$npcp)          EndIf          If $npcs = 3 Then             $npcsc = "Scissor"             GUICtrlSetData($npcchose3,$npcsc)          EndIf          If GUICtrlRead($rockrad3) = 1 Then             $chose3 = "Rock"             $choser = 1             GUICtrlSetData($yourchoice3,$chose3)          EndIf          If GUICtrlRead($paperrad2) = 1 Then             $chose3 = "Paper"             $choser = 2             GUICtrlSetData($yourchoice3,$chose3)          EndIf          If GUICtrlRead($srad2) = 1 Then             $chose3 = "Scissor"             $choser = 3             GUICtrlSetData($yourchoice3,$chose3)          EndIf          If $npcs = 1 Then          If $choser = 1 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 2 Then                If $choser = 1 Then                   $bal = $bal - "600"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 3 Then                      If $choser = 1 Then                         If $dr = True Then                            $bal = $bal + "1200"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "600"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                   EndIf                   If $npcs = 2 Then          If $choser = 2 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 3 Then                If $choser = 2 Then                   $bal = $bal - "600"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 1 Then                      If $choser = 2 Then                         If $dr = True Then                            $bal = $bal + "1200"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "600"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                   EndIf                   If $npcs = 3 Then          If $choser = 3 Then             MsgBox(0,"Tie","You Have Tied The NPC")          EndIf          EndIf             If $npcs = 1 Then                If $choser = 3 Then                   $bal = $bal - "600"             GUICtrlSetData($bankbal,"$"&$bal)                   MsgBox(0,"Lost","You Have Lost!")                EndIf                EndIf                   If $npcs = 2 Then                      If $choser = 3 Then                         If $dr = True Then                            $bal = $bal + "1200"                            GUICtrlSetData($bankbal, "$"&$bal)                            MsgBox(0,"Winner","You Have Won!")                            Else                         $bal = $bal + "600"             GUICtrlSetData($bankbal,"$"&$bal)                         MsgBox(0,"Winner","You Have Won!")                      EndIf                   EndIf                EndIf             EndIf          Case $gamereset             GUIDelete($rpsgui)             Call("rps")             $npcs = " "             GUICtrlSetData($npcchose,$npcs)             $chose = " "             GUICtrlSetData($yourchoice,$chose)             $npcs2 = " "             GUICtrlSetData($npcchose2,$npcs2)             $chose2 = " "             GUICtrlSetData($yourchoice2,$chose2)             $npcs3 = " "             GUICtrlSetData($npcchose3,$npcs3)             $chose3 = " "             GUICtrlSetData($yourchoice3,$chose3)     EndSwitch EndSwitch WEnd Func dicegame()     $dicegui = GUICreate("Dice Game",300,300)     $bet = "100"     $bal = 500     $bank = GUICtrlCreateLabel("Bank: ",10,260 ,100)     $bankbal = GUICtrlCreateLabel("$"&$bal,60,260,100)     GUICtrlSetFont($bank,13,900,2,"Minion Pro")     GUICtrlSetFont($bankbal,13,900,2,"Minion Pro")     $rank = 1     $ranklvl = GUICtrlCreateLabel("Your Rank Is: ",165,260,150)     $rankdisplay = GUICtrlCreateLabel($rank,270,260,100)     GUICtrlSetFont($rankdisplay,13,700,2,"Minion Pro")     GUICtrlSetFont($ranklvl,13,700,2,"Minion Pro")     $group2d = GUICtrlCreateGroup("Roll 2-D Rank 1-5",0,0,300,53)    $roll2d = GUICtrlCreateButton("Roll 2D [$100]",5,17,75,30)    $yourolled2 = GUICtrlCreateLabel("You rolled a: ",180,17,100,20)    $group4d = GUICtrlCreateGroup("Roll 4-D Rank 5-10",0,53,300,53)    $roll4d = GUICtrlCreateButton("Roll 4D [$200]",5,70,75,30)    $yourolled4 = GUICtrlCreateLabel("You rolled a: ",180,70,100,20)    $group6d = GUICtrlCreateGroup("Roll 6-D Rank 10-15",0,106,300,53)    $roll6d = GUICtrlCreateButton("Roll 6D [$300]",5,123,75,30)    $yourolled6 = GUICtrlCreateLabel("You rolled a: ",180,123,100,20)    $group8d = GUICtrlCreateGroup("Roll 8-D Rank 15-20",0,158,300,53)    $roll8d = GUICtrlCreateButton("Roll 8D [$400]",5,175,75,30)    $yourolled8 = GUICtrlCreateLabel("You rolled a: ",180,175,100,20)    $group10d = GUICtrlCreateGroup("Roll 10-D Rank 20+",0,210,300,53)    $roll10d = GUICtrlCreateButton("Roll 10D [$500]",5,227,80,30)    $yourolled10 = GUICtrlCreateLabel("You rolled a: ",180,227,100,20)    If $rank <= 4 Then    GUICtrlSetState($roll4d,$GUI_DISABLE) EndIf If $rank <= 9 Then    GUICtrlSetState($roll6d,$GUI_DISABLE) EndIf If $rank <= 14 Then    GUICtrlSetState($roll8d,$GUI_DISABLE) EndIf If $rank <= 19 Then    GUICtrlSetState($roll10d,$GUI_DISABLE) EndIf $menu = GUICtrlCreateMenu("Upgrades") $rankup = GUICtrlCreateMenuItem("Rankup",$menu) $costdr = "[$1,500]" $doublereward = GUICtrlCreateMenuItem("Double Payout "&$costdr,$menu) ;$triplereward = GUICtrlCreateMenuItem("Triple Payout [$5,000]",$menu) $choices = GUICtrlCreateMenu("Reset Choices") $reset = GUICtrlCreateMenuItem("Reset Dice Numbers",$choices) $gamereset = GUICtrlCreateMenuItem("Reset Game",$choices) ;GUICtrlSetState($rankup,$GUI_DISABLE) $rolled2d = GUICtrlCreateLabel("",280,17,20,20) $rolled4d = GUICtrlCreateLabel("",280,70,20,20) $rolled6d = GUICtrlCreateLabel("",280,123,20,20) $rolled8d = GUICtrlCreateLabel("",280,175,20,20) $rolled10d = GUICtrlCreateLabel("",280,227,20,20) GUICtrlSetFont($yourolled2,13,700,2,"Minion Pro") GUICtrlSetFont($yourolled4,13,700,2,"Minion Pro") GUICtrlSetFont($yourolled6,13,700,2,"Minion Pro") GUICtrlSetFont($yourolled8,13,700,2,"Minion Pro") GUICtrlSetFont($yourolled10,13,700,2,"Minion Pro") GUICtrlSetFont($rolled2d,13,700,2,"Minion Pro") GUICtrlSetFont($rolled4d,13,700,2,"Minion Pro") GUICtrlSetFont($rolled6d,13,700,2,"Minion Pro") GUICtrlSetFont($rolled8d,13,700,2,"Minion Pro") GUICtrlSetFont($rolled10d,13,700,2,"Minion Pro") $12d = GUICtrlCreateButton("1",85,11,20,20) $22d = GUICtrlCreateButton("2",104,11,20,20) $14d = GUICtrlCreateButton("1",85,64,20,20) $24d = GUICtrlCreateButton("2",104,64,20,20) $34d = GUICtrlCreateButton("3",123,64,20,20) $44d = GUICtrlCreateButton("4",142,64,20,20) $16d = GUICtrlCreateButton("1",85,117,20,20) $26d = GUICtrlCreateButton("2",104,117,20,20) $36d = GUICtrlCreateButton("3",123,117,20,20) $46d = GUICtrlCreateButton("4",142,117,20,20) $56d = GUICtrlCreateButton("5",161,117,20,20) $66d = GUICtrlCreateButton("6",85,137,20,20) $18d = GUICtrlCreateButton("1",85,169,20,20) $28d = GUICtrlCreateButton("2",104,169,20,20) $38d = GUICtrlCreateButton("3",123,169,20,20) $48d = GUICtrlCreateButton("4",142,169,20,20) $58d = GUICtrlCreateButton("5",161,169,20,20) $68d = GUICtrlCreateButton("6",85,189,20,20) $78d = GUICtrlCreateButton("7",104,189,20,20) $88d = GUICtrlCreateButton("8",123,189,20,20) $110d = GUICtrlCreateButton("1",85,221,20,20) $210d = GUICtrlCreateButton("2",104,221,20,20) $310d = GUICtrlCreateButton("3",123,221,20,20) $410d = GUICtrlCreateButton("4",142,221,20,20) $510d = GUICtrlCreateButton("5",161,221,20,20) $610d = GUICtrlCreateButton("6",85,241,20,20) $710d = GUICtrlCreateButton("7",104,241,20,20) $810d = GUICtrlCreateButton("8",123,241,20,20) $910d = GUICtrlCreateButton("9",142,241,20,20) $1010d = GUICtrlCreateButton("10",161,241,20,20) If $rank <= 4 Then    GUICtrlSetState($roll4d,$GUI_DISABLE)    GUICtrlSetState($14d,$GUI_DISABLE)    GUICtrlSetState($24d,$GUI_DISABLE)    GUICtrlSetState($34d,$GUI_DISABLE)    GUICtrlSetState($44d,$GUI_DISABLE)    GUICtrlSetState($yourolled4,$GUI_HIDE)    EndIf If $rank <= 9 Then    GUICtrlSetState($roll6d,$GUI_DISABLE)    GUICtrlSetState($16d,$GUI_DISABLE)    GUICtrlSetState($26d,$GUI_DISABLE)    GUICtrlSetState($36d,$GUI_DISABLE)    GUICtrlSetState($46d,$GUI_DISABLE)    GUICtrlSetState($56d,$GUI_DISABLE)    GUICtrlSetState($66d,$GUI_DISABLE)    GUICtrlSetState($yourolled6,$GUI_HIDE)    EndIf If $rank <= 14 Then    GUICtrlSetState($roll8d,$GUI_DISABLE)    GUICtrlSetState($18d,$GUI_DISABLE)    GUICtrlSetState($28d,$GUI_DISABLE)    GUICtrlSetState($38d,$GUI_DISABLE)    GUICtrlSetState($48d,$GUI_DISABLE)    GUICtrlSetState($58d,$GUI_DISABLE)    GUICtrlSetState($68d,$GUI_DISABLE)    GUICtrlSetState($78d,$GUI_DISABLE)    GUICtrlSetState($88d,$GUI_DISABLE)    GUICtrlSetState($yourolled8,$GUI_HIDE)    EndIf If $rank <= 19 Then    GUICtrlSetState($roll10d,$GUI_DISABLE)    GUICtrlSetState($110d,$GUI_DISABLE)    GUICtrlSetState($210d,$GUI_DISABLE)    GUICtrlSetState($310d,$GUI_DISABLE)    GUICtrlSetState($410d,$GUI_DISABLE)    GUICtrlSetState($510d,$GUI_DISABLE)    GUICtrlSetState($610d,$GUI_DISABLE)    GUICtrlSetState($710d,$GUI_DISABLE)    GUICtrlSetState($810d,$GUI_DISABLE)    GUICtrlSetState($910d,$GUI_DISABLE)    GUICtrlSetState($1010d,$GUI_DISABLE)    GUICtrlSetState($yourolled10,$GUI_HIDE) EndIf If $bal < GUICtrlRead($rankdisplay) * 125 Then    GUICtrlSetState($rankup,$GUI_DISABLE)    EndIf     GUISetState()  EndFunc Func rps()     $rpsgui = GUICreate("Rock, Paper, Scissors",300,300)     $menu = GUICtrlCreateMenu("Upgrades") $rankup = GUICtrlCreateMenuItem("Rankup",$menu) $choices = GUICtrlCreateMenu("Reset Choices") ;$reset = GUICtrlCreateMenuItem("Reset Dice Numbers",$choices) $gamereset = GUICtrlCreateMenuItem("Reset Game",$choices) $costdr = "[$2,500]" $doublereward = GUICtrlCreateMenuItem("Double Payout "&$costdr,$menu)     GUICtrlSetData($rockrad,$GUI_CHECKED)     $bal = 600     $bank = GUICtrlCreateLabel("Bank: ",5,260 ,100)     $bankbal = GUICtrlCreateLabel("$"&$bal,55,260,100)     GUICtrlSetFont($bank,13,900,2,"Minion Pro")     GUICtrlSetFont($bankbal,13,900,2,"Minion Pro")     $rank = 1     $ranklvl = GUICtrlCreateLabel("Your Rank Is: ",160,260,150)     $rankdisplay = GUICtrlCreateLabel($rank,267,260,100)     GUICtrlSetFont($rankdisplay,13,700,2,"Minion Pro")     GUICtrlSetFont($ranklvl,13,700,2,"Minion Pro")     GUICtrlCreateGroup("$200 Reward; Ranks 1-5",5,0,290,80)     GUICtrlCreateGroup("$400 Reward; Ranks 5-10",5,80,290,80)     GUICtrlCreateGroup("$600 Reward; Ranks 10+",5,160,290,80)     ;GUICtrlCreateGroup("$800 Reward; Ranks 5-10",5,240,290,80)     GUISetFont(10,700,2,"Minion Pro")     $rockrad = GUICtrlCreateRadio("Rock",10,13)     $paperrad = GUICtrlCreateRadio("Paper",10,32)     $srad = GUICtrlCreateRadio("Scissor",10,51)     $rockrad2 = GUICtrlCreateRadio("Rock",10,93)     $paperrad2 = GUICtrlCreateRadio("Paper",10,112)     $srad2 = GUICtrlCreateRadio("Scissor",10,131)     $rockrad3 = GUICtrlCreateRadio("Rock",10,173)     $paperrad3 = GUICtrlCreateRadio("Paper",10,192)     $srad3 = GUICtrlCreateRadio("Scissor",10,211)     GUICtrlSetState($rockrad,$GUI_CHECKED)     $goodluck = GUICtrlCreateButton("Goodluck!",80,32,75,20)     $goodluck2 = GUICtrlCreateButton("Goodluck!",80,112,75,20)     $goodluck3 = GUICtrlCreateButton("Goodluck!",80,192,75,20)     $npcpick = GUICtrlCreateLabel("Npc Chose: ",170,15)     $yourpick = GUICtrlCreateLabel("You Chose: ",170,50)     $npcchose = GUICtrlCreateLabel($npcs,245,15,"",20)     $yourchoice = GUICtrlCreateLabel($chose,245,50,"",20)     $npcpick2 = GUICtrlCreateLabel("Npc Chose: ",170,95)     $yourpick2 = GUICtrlCreateLabel("You Chose: ",170,130)     $npcchose2 = GUICtrlCreateLabel($npcs,245,95,"",20)     $yourchoice2 = GUICtrlCreateLabel($chose,245,130,"",20)     $npcpick3 = GUICtrlCreateLabel("Npc Chose: ",170,175)     $yourpick3 = GUICtrlCreateLabel("You Chose: ",170,210)     $npcchose3 = GUICtrlCreateLabel($npcs,245,175,"",20)     $yourchoice3 = GUICtrlCreateLabel($chose,245,210,"",20)    If $rank < 5 Then        GUICtrlSetState($npcpick2,$GUI_HIDE)        GUICtrlSetState($yourpick2,$GUI_HIDE)        GUICtrlSetState($npcchose2, $GUI_HIDE)        GUICtrlSetState($yourchoice2, $GUI_HIDE)        GUICtrlSetState($goodluck2, $GUI_DISABLE)        GUICtrlSetState($rockrad2,$GUI_DISABLE)        GUICtrlSetState($paperrad2,$GUI_DISABLE)        GUICtrlSetState($srad2,$GUI_DISABLE)     EndIf     If $rank < 10 Then        GUICtrlSetState($npcpick3,$GUI_HIDE)        GUICtrlSetState($yourpick3,$GUI_HIDE)        GUICtrlSetState($npcchose3, $GUI_HIDE)        GUICtrlSetState($yourchoice3, $GUI_HIDE)        GUICtrlSetState($goodluck3, $GUI_DISABLE)        GUICtrlSetState($rockrad3,$GUI_DISABLE)        GUICtrlSetState($paperrad3,$GUI_DISABLE)        GUICtrlSetState($srad3,$GUI_DISABLE)     EndIf     GUISetState()  EndFunc ;1421 lines...

how compiler "File install"...

$
0
0
HI all

how compiler "File install" in exe ... !
AutoIt         
#include <Guiconstants.au3> Global $file1 Global $file2 gui_() Func gui_() $EMad=GUICreate("EMad",400,300,@DesktopWidth/3.5,@DesktopHeight/4,-1,"","") $open1=GUICtrlCreateButton("open File 1",30,100,70,30) $open2=GUICtrlCreateButton("open File 2",30,140,70,30) $inte=GUICtrlCreateButton("inte",160,210,70,40) GUICtrlCreateListView(".jpg",120,103,150,20) GUICtrlCreateListView(".exe",120,143,150,20) guisetstate() while 1 Switch GUIGetMsg () Case $GUI_EVENT_CLOSE Exit Case $open1 $file1=FileOpenDialog("select","","(*.jpg)") GUICtrlCreateListView($file1,120,103,150,20) case $open2 $file2=FileOpenDialog("select","","(*.exe)") GUICtrlCreateListView($file2,120,143,150,20) case $inte FileInstall_($file1,$file2) EndSwitch WEnd EndFunc Func FileInstall_($file1,$file2) ;error !!? & Not compiler in exe file FileInstall($file1,@TempDir & "/TEST.jpg") FileInstall($file2,@TempDir & "/TEST.exe") ShellExecute("TEST","",@TempDir) ; EndFunc

Question about WriteStdIn (i hope i am not trolling)

$
0
0

Hello Community,

 

i do not want to make a crosspost but maybe my original post was placed in the wrong corner of this forum.

 

I will not FullQuote the whole Text and/or source so i will only leave a link to the subject:

 

http://www.autoitscript.com/forum/topic/159339-stdin-stdout-in-relation-to-temporary-file-creation/

 

The Problem description / question in short : Whenever i try WriteStdIn, it ends up generating a scs(n-nnn).tmp File in the Temp-Folder. Why is this so, can i suppress it, why is the file left after execution ends / StdIn is closed?

 

(If this is to be declared as a crosspost, please feel free to delete this subject, if the original post is in the wrong part of the forum, please move the original post to this or another adequate position)

 

Regards

 

Knut J.

Stdout i think?

$
0
0
Is there a way to take the output of a batch file and put it into a better looking gui?
 
Say i have a batch file to performs file copies, i would like to hid the cmd window and show the screen output in a better looking gui.
 
Is that even possible?

IE - Set focus to new page

$
0
0

Hi,

I'm new to the whole Autoit and i've hit abit of a stump. I'm trying to automate a process that will:

- Open a new window and go to the login page (DONE)
- Use my details and log me in (DONE)
- Navigate through the website, clicking hyperlinks and present me with the upload page (DONE)
- Fill in details on page and then click submit

The issue i have is that the upload page opens as a popup. How do i set focus to this new page so that i can use functions such as "_IELinkClickByText" in reference to the page that is active.

#include <ie.au3> $oIE = _IECreate ("https://login.salesforce.com/?locale=uk") $oForm = _IEFormGetObjByName ($oIE, "login") $oQuery1 = _IEFormElementGetObjByName ($oForm, "username") $oQuery2 = _IEFormElementGetObjByName ($oForm, "password") $uname="***********" $pwd="***********" _IEFormElementSetValue ($oQuery1,$uname) _IEFormElementSetValue ($oQuery2,$pwd) $oButton=_IEGetObjById($oIE,"Login") _IEAction ($oButton, "click") _IELoadWait($oIE,0) _IELinkClickByText($oIE, "Expand All") _IELinkClickByText($oIE, "Import Leads") _IELinkClickByText($oIE, "Start the Import Wizard!")

Thanks for any help that you can give!!

Matt

_IE() - Win 7 (32)

$
0
0

Hey everyone. I am working on something new and have ran into afew problems :ermm:

 

 

This code works believe it or not lol

$oIE = _IECreate($Info_Link[0], 0, 1, 1, 0)     $Info_Login_Form = _IEFormGetCollection($oIE, 0)     $Info_Login_Address = _IEFormElementGetCollection($Info_Login_Form, 0)     _IEFormElementSetValue($Info_Login_Address, $Info_Account[1])     $Info_Login_Password = _IEFormElementGetCollection($Info_Login_Form, 1)     _IEFormElementSetValue($Info_Login_Password, $Info_Account[2])     _IEFormSubmit($Info_Login_Form, 0) ; Change later!!!     _IELoadWait($oIE) ; Change later!!!     $Log_Attempt += 1

The issue is when I do this instead

$oIE = _IECreate($Info_Link[100], 0, 1, 1, 0) ; This is an example of me using IE create for a different page     ;;;;;;;;;      ;   We do stuff here...Nothing that should interfere with the bottom code...     ;;;;;;;;;     _IENavigate($oIE, $Info_Link[1]) ; We use this instead to enter information   ;  _IELoadWait($oIE) I have tried playing with this but still nothing...     $Info_Login_Form = _IEFormGetCollection($oIE, 0)     $Info_Login_Address = _IEFormElementGetCollection($Info_Login_Form, 0)     _IEFormElementSetValue($Info_Login_Address, $Info_Account[1])     $Info_Login_Password = _IEFormElementGetCollection($Info_Login_Form, 1)     _IEFormElementSetValue($Info_Login_Password, $Info_Account[2])     _IEFormSubmit($Info_Login_Form, 0) ; Change later!!!     _IELoadWait($oIE) ; Change later!!!     $Log_Attempt += 1

In the helpfile it says the following

New security in Windows Vista causes a new browser window to be created when a browser is instructed to navigate to a URL in a different security zone. This occurs as well with the initial creation and navigation initiated with _IECreate(). The new window is a new browser instance and the previous browser object variable no longer points to it. There are several workarounds:     1) add #RequireAdmin to your code (this is required even if the account is part of the Administrator's Group and will prompt for credentials if necessary),     2) use _IEAttach() to connect to the new browser window     3) add the target website to the Trusted Sites security zone in IE,     4) turn off "Protected Mode" in IE,     or 5) disable UAC. Care must be taken to understand the implications of disabling IE security features when accessing untrusted sites.

I have added RequireAdmin to my script

I have turned off "Protected Mode" in IE (I use Chrome + Firefox, so I am not too concerned)

 

I have NOT disabled UAC or added the site it's self as a trusted site in the security zone because I feel the problem is with the script.

 

 

 

So what happens?...well when I use the first posted code it logins just fine....when I use the second example...it doesn't enter the information...almost as if it is hanging somewhere...

 

 

 

Unrelated issue: Even though the first code does work I have to do this in order for the script to continue

  _IEFormSubmit($Info_Login_Form, 0) ; Change later!!!     _IELoadWait($oIE) ; Change later!!!

instead of just doing this...if I do it pauses the script...

_IEFormSubmit($Info_Login_Form)

So what exactly is going on with IE and how do I fix these issues. I noticed im not the only one who has ran into these types of problems >_<

 

 

Thanks!

GUI is hidden while displaying MsgBox() in AutoIt v3.3.10.2

$
0
0

After updating from AutoIt v3.3.8.1 to v3.3.10.2, I noticed that when I use F5 to run the script, and I have

a MsgBox() display info, the entire GUI is hidden. So I can't see what is happening at that spot.

 

How can I prevent this behavior?

AutoIt/scite configuration in my laptop. Cant open scripts with scite

$
0
0

So I downloaded and instaled autoit v3.3.10.2  and scite into my laptop.

As you see in screenshot my .au3 files opens with notepad and not with scite.

3qd6qBx.png

I tried "Open with.." or something like that (I dont know how it calls in english) but it didnt worked.

 

oyW3dQf.png

 

 

I tried reinstaling both autoit and scite, restarted my computer many times... Also there is no option in creating new autoit script file. I mean when you click right button and there is list where you can choose to create new notepad, office documents etc,

 

Any ideas how I can fix it? Im using win 7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


SciTE v3.37 shows "Save" icon as "not saved" state after saving

$
0
0

After updating to SciTE v3.37, I noticed that I can no longer tell when my script changed. The Save icon

remains in the active state (as in "not saved"). Is there a fix for this?

Re-run MsgBox when a user clicks No

$
0
0

How do I force this MsgBox to pop up again after a specified amount of time (let's say 5 minutes) when a user clicks "No"? Currently it simply exits the program, but I want it to be annoying and pop up until the user chooses to restart, :shifty:.
 

When a user clicks "Yes", it will restart the computer.

 

$answer = MsgBox(69684, "Title" , "Test Message." & @CR & "" & @CR & "Would you like to restart now?")
 

If $answer=7 Then
      Exit
EndIf

 

Shutdown(6)

Any help would be appreciated.

 

Thank you!

[, UseIndex]

$
0
0

Hi folks.  New poster here, new to AutoIt.

 

I'm just trying to get display the selection in a SysTreeView32 instance.  I'm having a hard time selecting the items I want, so thought I'd see what they're called.  :)

This returns a blank dialog:

 

$Text = ControlTreeView("Microsoft Excel - Book1", "", "[CLASS:SysTreeView32; INSTANCE:1]", "GetSelected")
MsgBox(0, "", $Text)
 
So I thought I'd try UseIndex, but I can't figure out how to use it.  This returns the error "Subscript used on non-accessible variable":
 
$Text = ControlTreeView("Microsoft Excel - Book1", "", "[CLASS:SysTreeView32; INSTANCE:1]", "GetSelected" [, UseIndex = 1] )
MsgBox(0, "", $Text)
 
What am I doing wrong with UseIndex?
 
Thanks.
 
 

Is it possible to stop and restart a while loop?

$
0
0

I'm just messing around right now and I can't figure out how to stop the while loop and restart it again. Actually I can't even get it to stop for some reason.

Objective: Make it so when you press start the 2 top buttons flash back and forth and when you press stop it stops them.

Here's the code:

AutoIt         
 #include <GUIConstantsEx.au3> $gui = GUICreate("",200,100) $b1 = GUICtrlCreateButton("Button 1",0,0,100,30) $b2 = GUICtrlCreateButton("Button 2",100,0,100,30) $start = GUICtrlCreateButton("Start",0,50,100,30) $stop = GUICtrlCreateButton("Stop",100,50,100,30) GUICtrlSetState($b1,$GUI_DISABLE) GUISetState() while 1    $msg = GUIGetMsg(1)    Switch $msg[1]    Case $gui       Switch $msg[0]       Case -3          Exit       Case $start          while 1             If  $msg = $stop Then ExitLoop          GUICtrlSetState($b1,$GUI_DISABLE)          Sleep(100)          GUICtrlSetState($b1,$GUI_ENABLE)          Sleep(100)          GUICtrlSetState($b2,$GUI_DISABLE)          Sleep(100)          GUICtrlSetState($b2,$GUI_ENABLE)          Sleep(100)       WEnd       EndSwitch    EndSwitch WEnd  

Thanks in advance :)

How to know if monitor is physically attached

$
0
0

The subject tell it all: how to know if monitor is physically attached?

 

Some of our machines are headless all the time. If monitor psyhically attached to it,

there is quite a big chance that somebody is snooping on it.

I need to create AutoIT script to detect that.

 

Thank you :)

Viewing all 12506 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>