All Activity

This stream auto-updates   

  1. Past hour
  2. Au3Builder, It can help ensure you scope your variables correctly. The Variables - using Global, Local, Static and ByRef tutorial in the Wiki is a good place to start to understand why this is important. M23
  3. Au3Builder, That will play the sounds sequentially, not simultaneously. The Sound UDF has not been updated for some time, so I fail to see why it does not work for you - it has in the past: M23
  4. followed the instructions and have rechecked Chrome.au3 is in the includes but when I run examples I get line 1 (the path to the file) #include <Chrome.au3> Error:Error Opening the file. Contimnung to look around and back check if I figure out what is wrong I'll update this.
  5. Today
  6. I'm telling the truth.Your script does not play any sound on my laptop.I'm running Windows 10. Wait! I already know why... I had to write 1 to second parametr in both cases. it's okay now. My version is v3.3.14.2 _SoundPlay($vSound_ID1, 1) _SoundPlay($vSound_ID2, 1) What are your thoughts on that?
  7. As the title says. I open IE11 and navigate to a page with the following HTML5 file upload container in Capture0.JPG I want to click Add Files but I haven't been able to. Here's the code that handles the Add Files button in Capture.JPG _IEGetObjectById and then using _IEAction to click it doesn't work. I can't give access to the actual page unfortunately because it's password protected. All suggestions welcome.
  8. I often see MustDeclareVars in peoples script.How is it useful?
  9. Au3Builder, Well, it works for me or else I would not have posted it - I do test my code. M23 P.S. And when you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - I know what I wrote and it just pads the thread unnecessarily.
  10. Your script does not work for me at all. no sound is played.I only changed FilePath variables.
  11. Scr1pter, Why not use the standard Sound UDF: #include "Sound.au3" Global $sFilePath_1 = "C:\Users\USER\Documents\A1.mp3" Global $sFilePath_2 = "C:\Users\USER\Documents\A2.mp3" $vSound_ID1 = _SoundOpen($sFilePath_1) $vSound_ID2 = _SoundOpen($sFilePath_2) _SoundPlay($vSound_ID1) ; Play and return immediately _SoundPlay($vSound_ID2, 1) ; Play and wait until it finishes _SoundClose($vSound_ID1) _SoundClose($vSound_ID2) M23
  12. This should do the two compiled script sound.au3 and sound2.au3 in the same directory next open sound.exe.You can delete sound2.exe now since sound.exe extracts sound2.exe on startup) sound.au3 FileInstall("sound2.exe","sound2.exe",0) Run("sound2.exe") Sleep(100) SoundPlay(@WindowsDir & "\media\tada.wav",1) sound2.au3 SoundPlay(@WindowsDir & "\media\tada.wav",1)
  13. I want to use AutoItX for my C++ Project. Im using Eclipse CDT and MinGW64 Compiler. 1. I downloaded the latest autoit 2. Included the header to the project 3. Included the librarys to the project #include <iostream> #include "AutoItX3_DLL.h" using namespace std; int main() { cout << "hello"; AU3_MouseMove(500,500,10); return 0; } It resolves the headers just fine and it compiles without errors but it literally just does nothing -> Blank Console and no mousemovement Pictures are attached. Any suggestions I think i am doing everything right
  14. #include <GDIPlus.au3> #include <WindowsConstants.au3> #include <ScreenCapture.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> ; Press ESC to exit script HotKeySet("{ESC}", "On_Exit") Global $Paused, $Runner Global $fNot_1_Vis = True, $iBegin = 0 Global $sAutoIt_Path = StringRegExpReplace(@AutoItExe, "(^.*\\)(.*)", "\1") _GDIPlus_Startup() Global $handle = WinGetHandle("[HANDLE:NOTEPAD]") ; This is the Handle from the window to capture found manual under WindowInfo! ; _GDIPlus_Shutdown() ; Shuts down the process. ; _ScreenCapture_SetJPGQuality(100);max image quality $scrFile = @ScriptDir & "\screenshot - " & @MDAY & @MON & @YEAR & '-' & @HOUR &@MIN& @SEC & ".png" ;save file with name format; _ScreenCapture_CaptureWnd($scrFile, "[ACTIVE]", -1, -1, -1, -1, 0) Opt("TrayAutoPause", 0) HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "Capture_Window") Func On_Exit() Exit EndFunc While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func Capture_Window($hWnd, $w, $h) $Runner = Not $Runner While $Runner Sleep(3000) If Int($w) < 1 Then Return SetError(2, 0, 0) If Int($h) < 1 Then Return SetError(3, 0, 0) Local Const $hDC_Capture = _WinAPI_GetDC(HWnd($hWnd)) Local Const $hMemDC = _WinAPI_CreateCompatibleDC($hDC_Capture) Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC_Capture, $w, $h) Local Const $hObjectOld = _WinAPI_SelectObject($hMemDC, $hHBitmap) DllCall("gdi32.dll", "int", "SetStretchBltMode", "hwnd", $hDC_Capture, "uint", 4) DllCall("user32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) _WinAPI_DeleteDC($hMemDC) _WinAPI_SelectObject($hMemDC, $hObjectOld) _WinAPI_ReleaseDC($hWnd, $hDC_Capture) Local Const $hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]") Local Const $aFullScreen = WinGetPos($hFullScreen) Local Const $c1 = $aFullScreen[2] - @DesktopWidth, $c2 = $aFullScreen[3] - @DesktopHeight Local Const $wc1 = $w - $c1, $hc2 = $h - $c2 WEnd EndFunc In this code i impemented some hotkey functions to create pause and terminate but problem is if i define f9 for Capture_Window() i allways get an Error, im sure its just a logic problem cause i miss to whrite it in the correct way?
  15. I was not able to use UDF in eclipse java. I tried the below which didn't work. Any help? Java: autoit.send(^l); autoit.send(^c); autoit.clipGet() Send("^l");; select the address bar Send("^c");; copy it to the clipboard $sStr = ClipGet()
  16. I was not able to use UDF in eclipse java. I tried the below which didn't work. Any help? Java: autoit.send(^l); autoit.send(^c); autoit.clipGet() Send("^l");; select the address bar Send("^c");; copy it to the clipboard $sStr = ClipGet()
  17. Please don't necro-post. You should start a new thread instead and you can link back to this thread if desired.
  18. I am having the same issue, in firefox --> combobox-->edit-search or enter address. Can any one help with this>
  19. faustf, Sorry about that - you must have another problem. Perhaps similar to this: M23
  20. I dont know what's going on quite yet, I would want to fix all this nomenclature to just say $sKey , $sValue and build standard looking map functions. If the goal is to take an array and mapify it, scripting dictionary might add more flexibility. Since maps are still only beta, it's also not a bad idea to keep this thread in the pocket
  21. Using code from first post, if you check the vartype for "fl_a2_xb" it's set as a "keyword" rather than Int32, if you change "xb" to anything else for example: Local $a3 = ["fo", "ch", "ca", "1b", "2b", "3b", "4b"] You'll notice the issue disappears, what constitutes a "keyword" type, have no idea, as I mentioned haven't really much experience with Maps, maybe @iamtheky will have an idea. For reference modified the IncrementStat function to: Func IncrementStat(ByRef $mTP, $sStatCode) Local $mStats[] $mStats = $mTP["stats"] Local $aMapKeys = MapKeys($mStats) For $i = 0 To UBound($aMapKeys) - 1 ConsoleWrite(@CRLF & " BEFORE =====>> $mStats[" & $aMapKeys[$i] & "] = " & $mStats[$aMapKeys[$i]] & " - " & VarGetType($mStats[$aMapKeys[$i]]) & @CRLF) If $aMapKeys[$i] = $sStatCode Then $mStats[$sStatCode] = $mStats[$sStatCode] + 1 ConsoleWrite( " AFTER =====>> $mStats[" & $aMapKeys[$i] & "] = " & $mStats[$aMapKeys[$i]] & " - " & VarGetType($mStats[$aMapKeys[$i]]) & @CRLF) Next $mTP["stats"] = $mStats EndFunc
  22. @all the string answers you are treating it as an array, and when specifying array indices it expects a number where you have placed a string, autoit makes your string the number 0. msgbox(0, '' , 0 = "one") I dont think that GetNew nor Incrementstat functions are tenable in their current form, you may have to pick another way, I would first try mapappend instead of incrementing a variable searching my map threads will show some obscure map/dictionary ways to do KV pairs.
  23. I found a solution #include <GUIToolbar.au3> GoogleSyncWait() Func GoogleSyncWait($timeout = 60) ;in seconds Opt("MustDeclareVars", 1) Local $hTimer = TimerInit() ;for timeout Local $hSysTray = ControlGetHandle("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32;TEXT:Obszar powiadomień użytkownika]") ;instead of instance I used "text" value to find proper system tray element if @error then Exit MsgBox($MB_ICONERROR, @ScriptName, "ControlGetHandle() failed. Exit") Local $bFound = false, $iSysTray_ButCount, $CMDiD, $sText, $counter = 0, $fDiff while not $bFound $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray) If $iSysTray_ButCount = 0 Then Exit MsgBox($MB_ICONERROR, @ScriptName, "_GUICtrlToolbar_ButtonCount() No items found in system tray") for $iSystray_ButtonNumber=0 to $iSystray_ButCount - 1 $CMDiD = _GUICtrlToolbar_IndexToCommand($hSysTray, $iSystray_ButtonNumber) $sText = _GUICtrlToolbar_GetButtonText($hSysTray, $CMDiD) if StringInStr($sText, "Kopia zapasowa i synchronizacja w usługach Google - Zaktualizowano") then $bFound = true ExitLoop EndIf Next Sleep(1000) $fDiff = Int(TimerDiff($hTimer)/1000) if Int($fDiff) > $timeout then Return MsgBox($MB_ICONERROR, @ScriptName, "GoogleSyncWait() timeout. Return", 10) WEnd EndFunc
  24. I know that code make no sense since: Dim $aArray[2] $aArray["param"] = "name" $aArray["stat"] = 1 "param" and "stat" in this situation will read as Integer 0. Such as declare is using in Python. I will not sure about klpc idea. This can be done with ObjCreate("Scripting.Dictionary")
  25. A user reported a secondary problem ( weird maps issue as opposed to versioning) without showing the problem. I would like to see that problem in code as with every other weird problem ever.
  26. @Ascer Haven't used maps much, but why would f1_a2_xb = 1? Its not being set in IncrementStat function also noticed if you changed that second to last line to: ConsoleWrite( " AFTER =====>> $mStats[fl_a2_xb] = " & $mStats["abcdefg"] & @CRLF) You'll still get 1 Am I missing something?
  1. Load more activity