Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. 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.
  3. Today
  4. 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!
  5. 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...
  6. 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
  7. 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
  8. 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 💪
  9. 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
  10. 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
  11. 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)
  12. Yesterday
  13. 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)
  14. Producing only a func as code is hardly helpful. Maybe you should give a runable script that expresses precisely the problem you are facing.
  15. @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
  16. 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.
  17. 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.
  18. @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)
  19. 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
  20. @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.
  21. You could start look at IE.udf especially the _IEGetObjById () function. Price is obj.innerText...
  22. 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
  23. 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
  24. 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.
  25. Thanks ! It works flawlessly. I feel a bit ashamed, I didn't think about this ^^
  26. Func MacroManagerGui() ;Opt("GUICoordMode", 2) ;Opt("GUIResizeMode", 1);those two change something with button scaling Opt("GUIOnEventMode", 1) Opt("GUICloseOnESC", 0) Global $Gui_ = GUICreate("Macro manager", 260, 75);, 1325, 760) GUICtrlCreatePic("PirateShip.jpg", -1, -1, 260, 75) GUICtrlSetState(-1, 128);allows the buttons to be pressed as fuck GUISetIcon("Randomicon.ico") Global $Hkey_ = GUICtrlCreateButton("Attach hotkey", 10, 10);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($Hkey_, "ButtonAttachmentGUI");"AssignNewHotkey") Global $ClickAcceleration = GUICtrlCreateButton("Accelerate clicking rate", 135, 10);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($ClickAcceleration, "AccelerateMouseClicks") Global $disableScript = GUICtrlCreateButton("Toggle the script", 10, 40);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($disableScript, "EnableDisableHotkeys") Global $clickNormalization = GUICtrlCreateButton("Normalize mouse clicks", 135, 40);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($clickNormalization, "NormalizeClicks") Global $oythor = GUICtrlCreateButton("Author", 92, 10);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($oythor, "Oythor") Global $helpOfDoom = GUICtrlCreateButton(" ? ", 106, 40);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($helpOfDoom, "HelpAsFuck") GUISetState(@SW_SHOW, $Gui_) GUISetOnEvent($GUI_EVENT_CLOSE, "KillTheProgram") ;GUISetOnEvent($GUI_EVENT_MINIMIZE, "KillTheProgram") ;GUISetOnEvent($GUI_EVENT_RESTORE, "KillTheProgram") EndFunc Second Gui: Func ButtonAttachmentGUI() ;Opt("GUICoordMode", 2) ;Opt("GUIResizeMode", 802);those two change something with button scaling ;Opt("GUIOnEventMode", 1) Opt("GUICloseOnESC", 0) Global $BAGui_ = GUICreate("Hotkey Assignment", 55, 190, -1, -1, 0x00040000);, 1325, 760) ;GUICtrlSetResizing($BAGui_, 802) ;GUICtrlCreatePic("PirateShip.jpg", -1, -1, 260, 75) GUICtrlSetState(-1, 128);allows the buttons to be pressed as fuck GUISetIcon("Randomicon.ico") Global $Hkey1_ = GUICtrlCreateButton("SET NUMPAD 999", 8, 10);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($Hkey1_, "HotkeyAssignment1") Global $Hkey2_ = GUICtrlCreateButton("SET NUMPAD 999", 8, 40);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($Hkey2_, "HotkeyAssignment2") Global $Hkey3_ = GUICtrlCreateButton("SET NUMPAD 999", 8, 70);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($Hkey3_, "HotkeyAssignment3") Global $Hkey4_ = GUICtrlCreateButton("SET NUMPAD 999", 8, 100);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($Hkey4_, "HotkeyAssignment4") Global $Hkey5_ = GUICtrlCreateButton("SET NUMPAD 999", 8, 130);, StringLen("Increase clicking rate")*10) GUICtrlSetOnEvent($Hkey5_, "HotkeyAssignment5") GUISetState(@SW_SHOW, $BAGui_) GUIDelete($Gui_) Call("CheckHKeyAvailability", $Hkey1_, 1) Call("CheckHKeyAvailability", $Hkey2_, 4) Call("CheckHKeyAvailability", $Hkey3_, 7) Call("CheckHKeyAvailability", $Hkey4_, 10) Call("CheckHKeyAvailability", $Hkey5_, 13) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseHKeyGui") ;GUISetOnEvent($GUI_EVENT_MINIMIZE, "KillTheProgram") ;GUISetOnEvent($GUI_EVENT_RESTORE, "KillTheProgram") ;Const $GWL_STYLE = -16 ;Const $WS_SIZEBOX = 262144 Local $hWnd = WinGetHandle("Hotkey Assignment") Local $style = _WinAPI_GetWindowLong($hWnd, -16) If BitXOR($style,262144) <> BitOr($style,BitXOR($style,262144)) Then _WinAPI_SetWindowLong($hWnd,-16,BitXOR($style,262144)) EndFunc Func CloseHKeyGui() GUIDelete($BAGui_) Call("MacroManagerGUI") EndFunc
  1. Load more activity
×
×
  • Create New...