Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. autoitte I wrote a program but my computer is good, but the program is running very slow what should I change to make the program run faster ?? HotKeySet("{ESC}", "Terminate") Func Terminate() Exit EndFunc $kar = 0 While 1 if $kar == 0 Then $coord = PixelSearch(800, 510, 800, 510, 0xF70000, 1) If Not @error Then MouseClick("left",700,300) $kar += 1 EndIf EndIf if $kar == 1 Then $coord = PixelSearch(800, 200, 800, 200, 0xF70000, 1) If Not @error Then MouseClick("left",700,300) $kar -= 1 EndIf EndIf Sleep(1000) WEnd
  3. Today
  4. As said before bij lars uia will give you this info for all browsers in a similar way. Examples in uia cover ff ie edge chrome safari opera browsers.
  5. Hello guys, I've got a little question: How do I check if the values or some of the values from an array ($alphabet) are also in the other array ($word)? Like: $alphabet[26] = [A,B,C,D,E,F,G, ...] $word = [H,E,L,L,O] How do I check if the values from $alphabeth (in this case H,E,L,L,O) are in the array called $word? Thanks in advance!
  6. The messages that you send to Paint need to be treated in a WindowProc function. Like all messages it is a notification not an order. So it all depends if the application captures the message and do something with it. In the case of Paint it looks like it does not. Take a look at this example in MSDN, that is quite close to what you want to achieve : https://docs.microsoft.com/fr-ca/windows/desktop/inputdev/using-mouse-input#drawing-lines-with-the-mouse You can see how this particular application captures the messages, but actually do something with it...
  7. Im okay with one file having info of all tabs open of last opened scite. Is there a way to make scite read it when starting by doubleclicking script, and not by doubleclicking scite.exe? Some registry-fu of passing parameter to scite while opening file? But that would be just bonus, I wouldnt mind if it opened scripts even when started by exe. The main issue I have is the first paragraph. If I have scite opened, doubleclicking script file should open it in opened scite window as new tab. Doubleclicking scite.exe should open new window everytime, so I can have ability to open more windows of scite while by default all scripts open in one window as tabs. I could swear, on my second computer (out of reach atm) it works exactly like that, but I already tried to copy the settings/registry and on my pc in question it only made things funkier than before
  8. AndroidZero, I did wonder whether to add the content to a timeout retraction - as you found out it is not difficult to do, so I will add that for the next release. Glad you find the new functionality useful. M23
  9. You forgot to store the message & title content of a notification that expired on timeout, well at least i missed it for my needs. Added following Line in Notify_Mod_TextRet.au3 (Script Line 887) Func __Notify_Timer() ... $g_aNotify_Data[0][9] = GUICtrlRead($g_aNotify_Data[$i][8]) & Opt("GUIDataSeparatorChar") & GUICtrlRead($g_aNotify_Data[$i][9]) .. I added a few functions from my current project to your example and it works like a charm for me ! #include "Notify_Mod_TextRet.au3" #include <MSSQL.au3> Opt("TrayAutoPause", 0) ; Press ESC to exit script HotKeySet("{ESC}", "_Exit") Global $samAccName = @UserName, _ $SQL_SERVER = "192.168.10.28", _ $SQL_USER = "devZero", _ $SQL_PW = "xxxxxxxxx", _ $SQL_DB = "kmp" ; Register message for click event _Notify_RegMsg() ; Set notification location _Notify_Locate(0) ; Show notifications Global $aNotCID[5] $aNotCID[0] = _Notify_Show(0, "Ticket 1", "Message 1") $aNotCID[1] = _Notify_Show(0, "Ticket 2", "Message 2") $aNotCID[2] = _Notify_Show(0, "Ticket 3", "Message 3") $aNotCID[3] = _Notify_Show(0, "Message - Andreas", "This is a test message click to answere") $aNotCID[4] = _Notify_Show(0, "Status", "SQL Server [online]", 1) While 1 Sleep(10) ;~ Opt("GUIDataSeparatorChar") For $i = 0 To 4 Local $sRet = _Notify_RetractCheck($aNotCID[$i]) Local $reason = $sRet[0] If $reason <> 0 Then Local $title = StringSplit($sRet[1],"|",1)[1] Local $msg = StringSplit($sRet[1],"|",1)[2] Local $timestamp = @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC EndIf If $reason == 0 Then ;===== nothing ==== ElseIf $reason == 1 Then ConsoleWrite(@CRLF & "========= $aNotCID[" & $i & "] =========") ConsoleWrite(@CRLF & "RetractCheck: Clicked Title") ConsoleWrite(@CRLF & "Title: " & $title) ConsoleWrite(@CRLF & "Message: " & $msg) ;~ Local $mscon = _MSSQL_Con($SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB) ;~ _MSSQL_Query($mscon, "INSERT INTO ticketlog (samAccName, notifyRetract, notifyTitle, notifyMessage, timeStamp) " & _ ;~ "VALUES ('" & $samAccName & "','" & $title & "','" & $msg & "','" & $timestamp & "')") If StringInStr($title,"Message", 1) Then $msgFrom = StringSplit($title," - ", 1)[2] _UDP_Messenger("Popup", "ChatWindow", $msgFrom) ElseIf StringInStr($title,"Ticket", 1) Then $ticketNr = StringSplit($title," ", 1)[2] _Ticket_Window("Edit", $ticketNr, Default, Default) EndIf ElseIf $reason == 2 Then ConsoleWrite(@CRLF & "========= $aNotCID[" & $i & "] =========") ConsoleWrite(@CRLF & "RetractCheck: Clicked Message") ConsoleWrite(@CRLF & "Title: " & $title) ConsoleWrite(@CRLF & "Message: " & $msg) ;~ Local $mscon = _MSSQL_Con($SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB) ;~ _MSSQL_Query($mscon, "INSERT INTO ticketlog (samAccName, notifyRetract, notifyTitle, notifyMessage, timeStamp) " & _ ;~ "VALUES ('" & $samAccName & "','" & $title & "','" & $msg & "','" & $timestamp & "')") If StringInStr($title,"Message", 1) Then $msgFrom = StringSplit($title," - ", 1)[2] _UDP_Messenger("Popup", "ChatWindow", $msgFrom) ElseIf StringInStr($title,"Ticket", 1) Then $ticketNr = StringSplit($title," ", 1)[2] _Ticket_Window("Edit", $ticketNr, Default, Default) EndIf ElseIf $reason == 9 Then ConsoleWrite(@CRLF & "========= $aNotCID[" & $i & "] =========") ConsoleWrite(@CRLF & "RetractCheck: Timeout") ConsoleWrite(@CRLF & "Title: " & $title) ConsoleWrite(@CRLF & "Message: " & $msg) ;~ Local $mscon = _MSSQL_Con($SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB) ;~ _MSSQL_Query($mscon, "INSERT INTO ticketlog (samAccName, notifyRetract, notifyTitle, notifyMessage, timeStamp) " & _ ;~ "VALUES ('" & $samAccName & "','" & $title & "','" & $msg & "','" & $timestamp & "')") ;~ _MSSQL_End($mscon) EndIf Next WEnd Func _Exit() Exit EndFunc Func _UDP_Messenger($mode, $window, $from) ; too big to show EndFunc Func _Ticket_Window($mode, $index, $styleLV, $styleGrid) ; too big to show EndFunc Really love your Notify UDF and since the last change it even more comfortable. Also I got a lot of ideas how to make it more customizeable and what new features could be usefull #GDI+ Animation. I will share the modified notify UDF when all tests are finished until then keep up your excellent work 💪
  10. Yolowbeard, Posting 2 functions does not help much, we need to see the whole thing so the interactions between the various sections are clear. And looking at the code, you might want to read the Forum rules before you post again - particularly the bit about not discussing game automation. At the moment I am happy for the thread to remain open as the problem is one of GUI interaction, but please be careful about what you post in future. M23
  11. Bea, A little research shows the following clause in the TOS of that site: So the thread does fall foul of the Forum rules and is therefore locked again - this time permanently and without appeal. Finally I strongly suggest that you do NOT complain using the same manner as after the previous lock - as I explained above, you have used up any flex I was prepared to show you and will look upon such communications with extreme prejudice. M23
  12. Using XP, the Inet* funcs don't work anymore on some (on most) https sites, so a third party tool is needed Try this #include <AutoItConstants.au3> Local $iPID = Run("curl -s -k https://soft98.ir/", "", @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($iPID) Local $output = StdoutRead($iPID) ConsoleWrite($output)
  13. Yesterday
  14. Sorry here's some runable script, which should draw a straight line (given you have the brush tool selected) but instead nothing happens #include <WinAPIGdiDC.au3> #include <SendMessage.au3> $hWnd = WinWait("Untitled - Paint") Func Mousedrag($x1,$y1,$x2,$y2) Local $WM_MOUSEMOVE = 0x0200 Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x2, $y2)) _SendMessage($hwnd, $WM_LBUTTONUP, $MK_LBUTTON, _WinAPI_MakeLong($x2, $y2)) EndFunc Mousedrag(484,554,732,554)
  15. Producing only a func as code is hardly helpful. Maybe you should give a runable script that expresses precisely the problem you are facing.
  16. @LinkOut SendMessage doesn't works for me and refers to WinHTTP file I've enabled OpenVPN too, because I'm in restricted country please fix this problem, this UDF is very important for me please add the feature if connection was slow or disconnected then waits for connection
  17. That would work but i'm trying to automate it so it can run in the background Thanks for the quick reply, I regularly visit the forums but try to solve my problems just by searching but this one has just got me stumped.
  18. ah, now i understand. okay that fills another hole in my understanding. thanks for that. i dare not ask about the FileClose() because in another topic i was told that i did not close the opened file because i closed the file with FileClose($filename) and it must be a "handle", which is something i do not quite understand yet, but okay. bit by bit i am learning. everything one step at a time.
  19. @phi7ip welcome to the forum. Have you tried just MouseClickDrag? This works great for drawing a line in paint: MouseClickDrag("left", 100, 200, 400, 400)
  20. Hi, have been banging my head against a wall for days everything I can find says that this should work but for the life of me can't get it to work I'm trying to automate the testing of an app in the background, which requires "drags" but when I execute this it registers as two separate events not a single drag I also tried testing it in paint and nothing happens when it should draw a ine Any input would be appreciated xx Func Mousedrag($x1,$y1,$x2,$y2) Local $WM_MOUSEMOVE = 0x0200 Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x2, $y2)) _SendMessage($hwnd, $WM_LBUTTONUP, $MK_LBUTTON, _WinAPI_MakeLong($x2, $y2)) EndFunc
  21. @Bea I would say consider yourself fortunate you encountered Melba, who is arguably much more patient than others of us. Even with your thread being reopened, your being nasty to the Moderation team doesn't exactly earn you any points for future issues.
  22. You could start look at IE.udf especially the _IEGetObjById () function. Price is obj.innerText...
  23. IniWrite overwrites the values of the keys which already exist, while FileOpen(... , 2) overwrites the whole file The previous script first creates a .ini file, 150 lines. OK. After deletion of duplicates, you get about 110 values Using only IniWrite, you will overwrite the first 110 lines. There will still be 150 lines in the final ini, including possible duplicates in the last 40 lines which are kept unchanged Using FileOpen, you delete all the old lines and then re-create 110 new ones. No possible duplicates BTW don't forget FileClose() after the job is done
  24. Another easy solution is to use notification like this : GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND") Func _WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $iIDFrom = _WinAPI_LoWord($wParam) Local $iCode = _WinAPI_HiWord($wParam) If $iIDFrom = $idEdit Then If $iCode = $EN_SETFOCUS Then GUISetAccelerators("") If $iCode = $EN_KILLFOCUS Then GUISetAccelerators($Arr) EndIf Return $GUI_RUNDEFMSG EndFunc ;==>_WM_COMMAND
  25. I accidentally pasted the version with the deletion of gui and re-creation. Just ignore the GUIDelete($Gui_) and Call("MacroManagerGUI") - these are added to remove and create back the first gui so everything works fine. Also, I don't know how to edit posts, so sorry about it.
  26. Thanks ! It works flawlessly. I feel a bit ashamed, I didn't think about this ^^
  1. Load more activity
×
×
  • Create New...