Leaderboard
Popular Content
Showing content with the highest reputation on 03/05/2016 in all areas
-
Please try creating the button before the GuiSetState()1 point
-
For button messages you must use WM_COMMAND GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ;... Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $lParam Switch BitAND($wParam, 0x0000FFFF) Case $my_button $stop = 1 ;<< use this to stop a loop (example) ; Exit EndSwitch Return 'GUI_RUNDEFMSG' EndFunc1 point
-
Another debugger for AutoIt
valdemar1977 reacted to asdf8 for a topic
New version: Added the ability to create scripts with a debugger to compile. Returned to debug with OEM-console. Changed interface. Fixed detected the errors. Others improvements and additions. Dbug_2016.03.05.zip1 point -
Would changing the Default Device before using SoundPlay() be out of the question? I use NirCMD to change the default device all the time because I use multiple headsets on my pc. You could always change the default device back after the sound is played. Unfortunately I do not know how to play audio on non-default devices.1 point
-
mike2003, _GUICtrlListView_EnsureVisible? Without some code to see exactly what is happening it is impossible to offer any sensible advice. M231 point
-
Advanced DllCall and DllStruct AutoIt Code Generator BETA v0.6
argumentum reacted to tarretarretarre for a topic
Okay I will check if InetGet dosent break the script, if not, I will switch to it, my recent tests seem to work, thanks for reminding me again1 point -
Advanced DllCall and DllStruct AutoIt Code Generator BETA v0.6
argumentum reacted to tarretarretarre for a topic
Yeah I could, but _Ie Library should work on Win10, but if its not consistant at all, i will re-write all the _Ie elements with InetGet, but so far ive only tested on IE 9 and IE 11 on Win 7 64 bit1 point -
Advanced DllCall and DllStruct AutoIt Code Generator BETA v0.6
tarretarretarre reacted to argumentum for a topic
why not use InetGet ? #include <string.au3> #include <array.au3> #include <InetConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> ;~ Local $oIE = _IECreate("https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx") ;~ Local $sHTML = _IEBodyReadHTML($oIE) Local $sHTML = Example( "https://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx" ) ConsoleWrite($sHTML&@CRLF) Local $try Local $timerinit = TimerInit() Do ;Exit loop after 10 sec of failure if TimerDiff($timerinit) > 10000 Then ExitLoop $try = _StringBetween($sHTML, "<pre>", "</pre>") Sleep(100) Until IsArray($try) _ArrayDisplay($try) Func Example($sIn) ; Save the downloaded file to the temporary folder. Local $sFilePath = _WinAPI_GetTempFileName(@TempDir) ; Download the file in the background with the selected option of 'force a reload from the remote site.' Local $hDownload = InetGet($sIn, $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Do Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) ; Retrieve the number of total bytes received and the filesize. Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD) Local $iFileSize = FileGetSize($sFilePath) ; Close the handle returned by InetGet. InetClose($hDownload) Local $sTxt = FileRead($sFilePath) ;~ ; Display details about the total number of bytes read and the filesize. ;~ MsgBox($MB_SYSTEMMODAL, "", "The total download size: " & $iBytesSize & @CRLF & _ ;~ "The total filesize: " & $iFileSize) ; Delete the file. FileDelete($sFilePath) Return $sTxt EndFunc ;==>Example1 point -
AnotherDude, Firstly, that looked like AutoHotKey code - so you are probably on the wrong forum. And secondly, please read the Forum rules - then you will see that we do not support game automation here and so you would not have got any help anyway. Thread locked. M231 point
-
But that's not it. When you start Windows you actually start a program (I'll underline it from now on). That program is the only thing that ever "touches" your computer's CPU. Then that program creates interface for you (the user) to start application(s). At the same time the program creates time slots in which it then puts tasks. Time slot is a portion of overall time. The program doesn't advertise how big one time-slot is. It can be two ticks, 1 millisecond, 6 instructions, or whatnot. This is done to create impression that it runs more things at the same time. It actually runs only one thing at any given time, but switches too fast for you to notice it. When mentioned applications are "started" the program puts it into one time slot. Sometimes these slots are divided into sub-slots (working threads) of a process. When one time-slot is "active" the program takes binary data (opcodes) from the application and "pushes" it to the CPU onto its behalf. Race condition can occur, for example, if the program has bug and allows two slots to overlap. This usually ends up with BSOD. More common and usual case of race condition occurring is when programmer asks the program to create sub-slots (threads) and then access the same addresses from two different sub-slots. Because the program didn't say for how long one sub-slot will run, it can happen that one sub-slot runs for longer time than another before execution is switched to another sub-slot. First slot might have executed more instructions. The problem for the code in another sub-slot is that the code from the first one may have changed data at the shared addresses. Then that other thread continues, but has no idea that the data it works on has been changed by someone else. Now, that is it in layman's terms.1 point
-
#include <GUIConstants.au3> GUICreate("My GUI Test-Tab"); will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $tab = GUICtrlCreateTab(10, 10, 200, 100) $tab0 = GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel( "Hello", 10, 32, 642, 312, 0x1000) GUICtrlSetBkColor(-1, 0xf5f5dc) $tab1 = GUICtrlCreateTabItem("tab1") GUICtrlSetState(-1, $GUI_SHOW) GUICtrlCreateLabel( "Hi!", 10, 32, 642, 312, 0x1000) GUICtrlSetBkColor(-1, 0xffffff) $tab2 = GUICtrlCreateTabItem("tab2") $test = GUICtrlCreateLabel( "Test", 10, 32, 642, 312, 0x1000) GUICtrlSetBkColor(-1, 0xf123456) GUICtrlCreateTabItem(""); end tabitem definition $tabed = 0 GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case GUICtrlRead($tab) = 0 And $tabed <> 0 $tabed = 0 MsgBox(0, "test", "tab0") Case GUICtrlRead($tab) = 1 And $tabed <> 1 $tabed = 1 MsgBox(0, "test", "tab1") Case GUICtrlRead($tab) = 2 And $tabed <> 2 $tabed = 2 MsgBox(0, "test", "tab2") EndSelect WEnd1 point
-
Check Wan IP with Email Notification
bootlesnet reacted to sshrum for a topic
Nice one. I actually wrote the same thing (sorta) in PHP. Supports DNS registering, FTP, and email. Check this out: http://www.shrum.net/code/?body=./wan2web/home.html Odd...I called my log file wanip.txt too FYI: I just noticed the http://whatismyip.org...I've been hosting my own WAN IP display at http://www.shrum.net/getip.php1 point