Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. You’re confusing as all get out. You say you want a passive solution but actually want something actively looking for things to happen. You gonna have to make up your mind Before you set out your requirements. I told you before if you save logs it should be a text file and you can read those text files and monitor it that way I’m not going to do your work for you
  3. The point of not stealing focus is so that I'm not typing into "nothingness" when the new dialog pops up. I may type several sentences without looking at my monitor. In a previous life, the Domino email client was notorious for this, notifications popping up and stealing focus, and if you press Enter, presto - it disappears without a clue as to what the notification was.
  4. Excel UDF Error

    Seems you run an older version of AutoIt. Either update AutoIt or implement the following fixes: https://www.autoitscript.com/forum/topic/184106-fixed-versions-of-_excel_rangefind-_excel_bookopen-and-_word_docsaveas/
  5. What happens when you restart the computers? Could itbe you have dozens of ie processes running. Maybe specific addins are loaded. Can you manually browse to the url you want.
  6. the capture part, probably a way, but the dialog without stealing focus doesn't make much sense to me. good luck.
  7. I'm working on a script using Yashied's HotKey UDF (which I like more than AutoIt standard hotkeys), for more easy control of some other application. To do what I very often want with this other appl, I normally have to first press two separate keys (ALT + some letter), so I use the HotKey UDF mainly to be able to press a single Fkey instead of pressing two keys. But sometimes the other appl will pop-up anotther subwindow asking something, like to confirm the thing I asked for. But since that doesn't happen every time, I don't know the right way to handle that. Here's the kind of thing I've tried, but it fairly often gets messed up and stops working / stops responding to the Fkeys: #include <Array.au3> #include <Constants.au3> #include <Misc.au3> #include "HotKey_21b.au3" #include "vkConstants.au3" AutoItSetOption("MustDeclareVars", 1) AutoItSetOption("WinTitleMatchMode", 2) AutoItSetOption("GUIOnEventMode", 1) SetupHotkeys() Do Sleep( 10 ) Until False Exit ; ;================================ ; Func SetupHotkeys() _HotKey_Assign( $VK_F8, "Copy_File", $HK_FLAG_DEFAULT ) _HotKey_Assign( $VK_F9, "Move_File", $HK_FLAG_DEFAULT ) _HotKey_Assign( $VK_F10, "CloseThis", $HK_FLAG_DEFAULT ) _HotKey_Enable() EndFunc ; ;================================ ; Func CloseThis() ; Clear hotkeys and exit _HotKey_Disable() _HotKey_Release() Exit EndFunc ; ;================================ ; Func Copy_File() Local $iStat, $whMain, $whSubwin, $bSubWinReady, $iSubWinLoopCount If ProcessExists( "OtherProgram.exe" ) = 0 Then Return $whMain = WinActive( "Other" ) If $whMain = 0 Then $whMain = WinActivate( "Other" ) If $whMain = 0 Then Return EndIf EndIf $iStat = ControlSend( $whMain, "", "", "!c" ) If $iStat <> 1 Then Return EndIf $iSubWinLoopCount = 0 $bSubWinReady = False While (Not $bSubWinReady) And ($iSubWinLoopCount < 30) $whSubwin = WinActive( "Copy To Folder" ) If $whSubwin = 1 Then $bSubWinReady = True Else $whSubwin = WinWaitActive( "Copy To Folder", "", 1 ) If $whSubwin <> 0 Then $bSubWinReady = True Else $iSubWinLoopCount += 1 $iStat = ControlSend( $whMain, "", "", "!c" ) If $iStat <> 1 Then Return EndIf EndIf EndIf WEnd If Not $bSubWinReady Then ;too many times through loop Return EndIf $iStat = ControlClick( $whSubwin, "", "OK" ) If $iStat <> 1 Then Return EndIf $iSubWinLoopCount = 0 $bSubWinReady = False While (Not $bSubWinReady) And ($iSubWinLoopCount < 3) $whSubwin = WinActive( "Confirm File Replace" ) If $whSubwin = 1 Then $bSubWinReady = True Else $whSubwin = WinWaitActive( "Confirm File Replace", "", 1 ) If $whSubwin <> 0 Then $bSubWinReady = True Else $iSubWinLoopCount += 1 EndIf EndIf WEnd If $bSubWinReady Then ;If the subwindow DID appear Sleep( 200 ) $iStat = ControlClick( $whSubwin, "", "[ID:3746]" ) ; Press "Skip" button If $iStat <> 1 Then Return EndIf EndIf Return EndFunc ; ;================================ ; Func Move_File() Local $iStat, $whMain, $whSubwin, $bSubWinReady, $iSubWinLoopCount If ProcessExists( "OtherProgram.exe" ) = 0 Then Return $whMain = WinActive( "Other" ) If $whMain = 0 Then $whMain = WinActivate( "Other" ) If $whMain = 0 Then Return EndIf EndIf $iStat = ControlSend( $whMain, "", "", "!m" ) If $iStat <> 1 Then Return EndIf $iSubWinLoopCount = 0 $bSubWinReady = False While (Not $bSubWinReady) And ($iSubWinLoopCount < 30) $whSubwin = WinActive( "Move To Folder" ) If $whSubwin = 1 Then $bSubWinReady = True Else $whSubwin = WinWaitActive( "Move To Folder", "", 1 ) If $whSubwin <> 0 Then $bSubWinReady = True Else $iSubWinLoopCount += 1 $iStat = ControlSend( $whMain, "", "", "!m" ) If $iStat <> 1 Then Return EndIf EndIf EndIf WEnd If Not $bSubWinReady Then ;too many times through loop Return EndIf $iStat = ControlClick( $whSubwin, "", "OK" ) If $iStat <> 1 Then Return EndIf $iSubWinLoopCount = 0 $bSubWinReady = False While (Not $bSubWinReady) And ($iSubWinLoopCount < 3) $whSubwin = WinActive( "Confirm File Replace" ) If $whSubwin = 1 Then $bSubWinReady = True Else $whSubwin = WinWaitActive( "Confirm File Replace", "", 1 ) If $whSubwin <> 0 Then $bSubWinReady = True Else $iSubWinLoopCount += 1 EndIf EndIf WEnd If $bSubWinReady Then ;If the subwindow DID appear Sleep( 200 ) $iStat = ControlClick( $whSubwin, "", "[ID:3746]" ) ; Press "Skip" button If $iStat <> 1 Then Return EndIf EndIf Return EndFunc But maybe this whole idea is no good. What would be a better way, please.
  8. IE Class Tag Inside of Iframe?

    It is not letting me open the html once I have saved it. Is there anything else I can get a screenshot of that would help?
  9. Click by index or instance and in uiautomation udf i also made indexrelative to another object. And with collections it is as given above or iterate over the collection.
  10. Sorry, not ahk. Rather, AutoIt. Old habit. (Also, I guess I should be using the term "taskbar button" as opposed to "taskbar tab".) I'm aware of Conversation History in Outlook. But, I'm looking for a passive solution, not something that requires me to go looking to see if a new Skype conversation button appears in the taskbar. When someone uses Skype to message me, a new button appears in the taskbar, and it flashes for several seconds. Can AutoIt capture that and then perform some action like displaying a dialog box without stealing focus from whatever app has focus?
  11. Today
  12. jepp you are right. I changed the script based on that Select <p> document.getElementsByTagName('p')[1].click(function(){var range ;range = document.createRange();range.selectNodeContents(document.getElementsByTagName('p')[0]);window.getSelection().addRange(range)}); _WD_ExecuteScript($sSession, 'document.getElementsByTagName('p')[1].click(function(){var range ;range = document.createRange();range.selectNodeContents(document.getElementsByTagName('p')[1]);window.getSelection().addRange(range)});') __WD_Post: URL=HTTP://127.0.0.1:4444/session/87406f69-c375-4321-9e48-c0860f247cd2/execute/sync; $sData={"script":"document.getElementsByTagName('p')[1].click(function(){var range ;range = document.createRange();range.selectNodeContents(document.getElementsByTagName('p')[1]);window.getSelection().addRange(range)});", "args":[[]]} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ExecuteScript: {"value":null} But the selection them self is still outstanding.... :-(
  13. not sure. did you search that on google? you can also just use outlook to look at convo history. it's in the users guide Conversation History Skype for Business conversations are saved by default. To view Conversations:  In the main Skype for Business window click on the Conversation tab. All conversations will be listed with the most recent on top; double click on one to open and view a conversation. OR  In Outlook, Skype for Business conversations are saved in a folder labelled Conversation History. there are outlook udf's and such to process that I would imagine.
  14. I think we may be misunderstanding each other. The Skype for Business app is always running from the moment WIndows starts up. That window shows all of my contacts. When someone else sends me a Skype message, a new tab (?) flashes on the Windows' taskbar for several seconds, then stops flashing. When I click on that taskbar tab, it opens a Skype conversation window. If I find something in the log that indicates that I received a Skype message, can that be monitored for in realtime by ahk?
  15. _stringbetween empty string

    Maybe this helps with your problem.... #include <Array.au3> Global $Count = 0, $iStringIN = "59?\nHello\nAutoit\nWorld\n" Global $aArray = _StringBetween2($iStringIN, "\n", "\n", 0) _ArrayDisplay($aArray, "Default Search") Func _StringBetween2($s_String, $s_Start, $s_End, $v_Case = 0) Local $iPos1 = 0, $iPos2 Local $sRes = "" Do $iPos1 = StringInStr($s_String, $s_Start, $v_Case, 1, $iPos1 + 1) $iPos2 = StringInStr($s_String, $s_End, $v_Case, 1, $iPos1 + 1) If $iPos2 > 0 Then $sRes &= StringMid($s_String, $iPos1 + StringLen($s_Start), $iPos2 - $iPos1 - StringLen($s_End)) & $s_Start Until $iPos1 = 0 Or $iPos2 = 0 Local $aRes = StringSplit($sRes, $s_Start, 3) ReDim $aRes[UBound($aRes) -1] Return $aRes EndFunc ;==>_StringBetween2
  16. I need to select radio 3 of question 13, has anybody know how to auto select <div class="dvquestion" id="questionitem-1" style="display:none"> <h3 class="text-orange">Question 1 </h3> <p><div>Who is Mr Bean?<br></div></p> <div class="lb_question"> <label><input type="radio" name="anwswer_13" value="1"> <span onclick="return selectCard(this);">Super man</span></label><br> <label><input type="radio" name="anwswer_13" value="2"> <span onclick="return selectCard(this);">Policeman</span></label><br> <label><input type="radio" name="anwswer_13" value="3"> <span onclick="return selectCard(this);">Actor</span></label><br> </div>
  17. Input validation and error returns

    How about having a string value for each error instead of a number? You would have to initialize the string with a null value, but then you can add an @CRLF to the beginning of each error that accumulates and add that into a MsgBox string. Something like this: $txtError = "" If Test1Failed then $txtError = $txtError & @CRLF & "Test one failed" If Test2Failed then $txtError = $txtError & @CRLF & "Test two failed" If Test3Failed then $txtError = $txtError & @CRLF & "Test three failed" If Test4Failed then $txtError = $txtError & @CRLF & "Test four failed" If $txtError = "" Then MsgBox(48, "Info", "No errors!") Else MsgBox(16, "Error!", $txtError) EndIf You could even put the code block in a loop and only exit the loop if there are no errors or the user cancels the process.
  18. ^ This. The p element doesn't have a select function.
  19. I think the select method is for the input elements.
  20. Hi, i´m not know how to select a text string within a textwindow. this works _WD_ExecuteScript($sSession, 'return  document.getElementsByTagName('p')[1].innerHTML;') __WD_Post: URL=HTTP://127.0.0.1:4444/session/fc4b43b3-2c7b-4ce1-92fb-660e2d017aab/execute/sync; $sData={"script":"return  document.getElementsByTagName('p')[1].innerHTML; ", "args":[[]]} __WD_Post: StatusCode=200; ResponseText={"value":"test2"} _WD_ExecuteScript: {"value":"test2"} But this not _WD_ExecuteScript($sSession, 'document.getElementsByTagName('p')[1].select;') __WD_Post: URL=HTTP://127.0.0.1:4444/session/fc4b43b3-2c7b-4ce1-92fb-660e2d017aab/execute/sync; $sData={"script":" document.getElementsByTagName('p')[1].select; ", "args":[[]]} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ExecuteScript: {"value":null} In the w3school description is a example LINK --> select() with brackets. If i execute the function without brackets, i got the Status Code 200 back but nothing is selected. If i excute the function with brackets, i got the status code 500 _WD_ExecuteScript($sSession, 'document.getElementsByTagName('p')[1].select();') _WD_ExecuteScript: {"value":{"error":"javascript error","message":"TypeError: document.getElementById(...).select is not a function","stacktrace":"execute_script @, line 0\ninline javascript, line 1\nsrc: \"undefined\"\nStack:\n}} Can someone explain to me what i don´t understand again??? Many thanks horphi
  21. Huh? Parse xml with microsoft.xmldom or something similar.
  22. FileInstall not working

    Sorry for necroposting, but I seem to have found a solution (reboot didn't work for me). I used this code $Sound_bar = @TempDir & "\Sound_bar.wav" FileInstall("C:\Users\555\Desktop\scripts_run\alarm1.wav", $Sound_bar) Code is no mine, found on this forum, long live the guy who posted it. So, it creates a file in the %temp% with the corresponding name and installs the sound off of it. Win+R, go to %temp% and you'll find it. Rename it to Sound_bar1 or whatever and you're free to install your second sound even if it's in the same folder. Apparently reboot didn't erase temp files in my case.
  23. _stringbetween empty string

    Yes it is. Look again at what @VIP pointed: the help file. Read there again and conclude.
  24. I tried this already...works unfortunately not...:-( _WD_ExecuteScript: {"value":{"error":"javascript error","message":"TypeError: document.getElementsByTagName(...)[1].select --> is not a function","stacktrace":"execute_script @, line 0\ninline javascript, line 1\nsrc: \"undefined\"\nStack:\n
  25. _stringbetween empty string

    looks sweet, but it is not fixing the problem... :-(
  26. do x if script is already running

    but what is the name of the function that allows me to do that? (edit: HotKeySet, right?) well I was just joking cause that's kinda how it felt to me since I'm a beginner
  1. Load more activity
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.