Jump to content

anthonyjr2

Active Members
  • Posts

    265
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    anthonyjr2 got a reaction from Musashi in _FileListToArray returning error code when running as administrator   
    Everything I saw online was saying to not use a mapped drive, as UNC paths would be ideal for admin scripts. The share has access set to "Everyone" so I don't think it would have been a permissions issue.
     
    However, I did some further googling and turns out adding EnableLinkedConnections as a key to the registry in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" and restarting the PC fixed the problem. Something to do with allowing access to network locations in elevated processes. Thanks for the tip though, I will try mapping drives in the future if I run into other problems.
  2. Like
    anthonyjr2 got a reaction from Jos in _FileListToArray returning error code when running as administrator   
    Everything I saw online was saying to not use a mapped drive, as UNC paths would be ideal for admin scripts. The share has access set to "Everyone" so I don't think it would have been a permissions issue.
     
    However, I did some further googling and turns out adding EnableLinkedConnections as a key to the registry in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" and restarting the PC fixed the problem. Something to do with allowing access to network locations in elevated processes. Thanks for the tip though, I will try mapping drives in the future if I run into other problems.
  3. Confused
    anthonyjr2 got a reaction from ibrahem in image search - (Moved)   
    Do you have the .dlls for the architecture you're trying to run in the correct folder? This UDF is super finicky when it comes to seeing the libraries.
  4. Like
    anthonyjr2 reacted to water in Importing a text file with Excel   
    Please check https://msdn.microsoft.com/en-us/vba/excel-vba/articles/workbooks-opentext-method-excel  for the FieldInfo information about fixed width input files.
  5. Like
    anthonyjr2 got a reaction from atwolf359 in Pandora Get   
    This is a verrrry old thread, you probably could have gotten away with creating your own and then linking to this one, and gotten better replies with a better title.
    EDIT: That said, it seems that the song information is within the "trackData" div on the now playing page. If you do a CTRL+F for that div you should be able to find the location. My guess is the song is pulled through Javascript, but there are probably other ways to pull the song information off of the page. If you go to inspect element you can do a search for the song you're listening to to find it's location.
    EDIT 2: You should be able to pull the live page source every 15 seconds or so and just use some sort of Regex to pull the song name/artist off of the page.
  6. Like
    anthonyjr2 got a reaction from Skysnake in IE.au3 compile error   
    You could try grabbing the latest version of AU3Stripper.exe from here:
    https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/
    It looks like it was updated today, 1/12/2017.
  7. Like
    anthonyjr2 got a reaction from mlazovjp in C:\Windows\System32\DisplaySwitch.exe is hidden from AutoIt in Windows 10 1703 (Creators Update)   
    My guess is the DisplaySwitch binary maybe switched to being 64-bit?
    Try adding this to the top of your script:
    #AutoIt3Wrapper_UseX64=Y  
  8. Like
    anthonyjr2 reacted to iamtheky in Using regex to check the format of a string   
    $str = "AB12345C" msgbox(0, '' , stringregexp($str , "[A-Z]{2}[0-9]{5}[A-Z]"))  
    *If that is the entirety of the string you may want to put beginning/ending anchors on that pattern so that it does not match on partials.
  9. Like
    anthonyjr2 reacted to jchd in Using regex to check the format of a string   
    Make that
    stringregexp($str , "^[A-Z]{2}[0-9]{5}[A-Z]$") if you want to insure there is nothing before nor after the mandatory pattern.
  10. Like
    anthonyjr2 got a reaction from rapt3r in Variable must be of type "Object" Error [excel]   
    Put this at the top of your code:
    #AutoIt3Wrapper_UseX64=Y  
  11. Like
    anthonyjr2 got a reaction from SkysLastChance in [Solved] Capture other lines of _IEGetObjById?   
    How about this? It will work if the line will always have "Submission" in it:
    #include <IE.au3> $oIE = _IEAttach("Form Details") $oDiv = _IEGetObjById($oIE, "Col3") ;Phone $oCol = _IETagNameGetCollection($oDiv, "dd") Local $text For $col in $oCol If(StringInStr($col.innerText, "Submission")) Then $text = $col.innerText ExitLoop EndIf Next MsgBox (0,"Oops",$text)  
  12. Like
    anthonyjr2 reacted to TheDcoder in Trying to loop through every row in a Excel sheet   
    Yep, I can understand .
    P.S Congratulations on the 200th post
  13. Like
    anthonyjr2 reacted to water in Trying to loop through every row in a Excel sheet   
    Congrats
  14. Like
    anthonyjr2 got a reaction from TheDcoder in Trying to loop through every row in a Excel sheet   
    I admit I didn't have performance in mind when I was looking for a solution....usually when I am throwing a project together I use the first working answer I come across 
     
    P.S. This is my 200th post 
  15. Like
    anthonyjr2 reacted to water in Finding a string in a Word Document   
    Right now I'm sitting in front of my Windows PC and try to find out what causes the problem.
    I tested:
    Section break (next page) - works as expected (finds all occurrences) Section break (continuous)  - works as expected (finds all occurrences) Column break  - works as expected (finds all occurrences) To be continued  
  16. Like
    anthonyjr2 got a reaction from fw85 in Cannot check SysTreeView32 item   
    I've found a solution, although it requires an external UDF. For some reason the built in TreeView doesn't work correct on a lot of SysTreeView32 controls, but this other one I found does. I think it is a problem with 32/64 bit architectures. You can get the other UDF from here and then use it in your script like so:
    #RequireAdmin #AutoIt3Wrapper_UseX64=N #include "r_SysTreeView.au3" Run("winamp5666_full_all.exe"); WinWait("Installer Language", "Please select a language."); WinActivate("Installer Language", "Please select a language."); ControlClick("Installer Language", "Please select a language.", 1); WinWait("Winamp Installer", "Welcome to the Winamp installer"); WinActivate("Winamp Installer", "Welcome to the Winamp installer"); ControlClick("Winamp Installer", "Welcome to the Winamp installer", 1); WinWait("Winamp Installer", "License Agreement"); WinActivate("Winamp Installer", "License Agreement"); ControlClick("Winamp Installer", "License Agreement", 1); WinWait("Winamp Installer", "Choose Install Location"); WinActivate("Winamp Installer", "Choose Install Location"); ControlClick("Winamp Installer", "Choose Install Location", 1); WinWait("Winamp Installer", "Choose Components"); WinActivate("Winamp Installer", "Choose Components"); ControlCommand("Winamp Installer", "Choose Components", 1017, "SelectString", "Full"); ControlTreeView("Winamp Installer", "Choose Components", 1032, "Expand", "#2"); ControlTreeView("Winamp Installer", "Choose Components", 1032, "Expand", "#2|#1"); ControlSysTreeView("Winamp Installer", "Choose Components", "[CLASS:SysTreeView32; ID:1032]", "Uncheck", "#2|#1|#1") I know this is an odd workaround, but hey it works for me. Also make sure you are compiling non 64-bit (I added the option at the top of my code).
  17. Like
    anthonyjr2 got a reaction from Hanukka in Code for clicking a button by text not working in IE   
    This isn't a limitation of the UDF or the website, it's a limitation of all browsers in general. They purposely deny XSS for security reasons.
  18. Like
    anthonyjr2 got a reaction from SkysLastChance in [SOLVED] _IEImgClick Help   
    For $oForm In $oForms MsgBox($MB_SYSTEMMODAL, "Form Info", $oForm.name) _IEImgClick($oForm, "TogglePlus.gif", "src") Next Does this work? The image doesn't show on my end so I can't test if it clicks.
  19. Like
    anthonyjr2 got a reaction from Hanukka in Code for clicking a button by text not working in IE   
    Alright, I've worked out that this is an issue with the iFrames on stackoverflow. You will get an Access Denied error like so:
    err.number is: 0x80020009 err.windescription: Exception occurred. err.description is: Access is denied. err.source is: err.helpfile is: C:\Windows\System32\mshtml.hlp err.helpcontext is: 0 err.lastdllerror is: 0 err.scriptline is: 1899 err.retcode is: 0x80070005 if you try to access the elements in the iframe. Apparently this is due to an XSS restriction, the iframe might be hosted on another url, but I can't find the link anywhere.
    Here's my code in case someone else wants to give it a shot:
    #AutoIt3Wrapper_UseX64=Y #include <IE.au3> _IEErrorHandlerRegister(_User_ErrFunc) $oIE = _IECreate('https://stackoverflow.com/questions/901712/how-to-check-whether-a-checkbox-is-checked-in-jquery', 0) _IELoadWait($oIE) WinSetState("[ACTIVE]", "", @SW_MAXIMIZE) $oIE.document.parentwindow.scroll(0, $oIE.document.body.scrollHeight/(10)) ;;;get to the button area $oButtons = _IETagnameGetCollection($oIE, "button") For $oButton in $oButtons If String($oButton.innertext) = " Run code snippet" Then _IEAction($oButton, "click") EndIf Next Sleep(2000) $oIE = _IEAttach("Stack Overflow") $oFrames = _IEFrameGetCollection($oIE) ;It is the first frame itself $iLength = $oFrames.length ;MsgBox(64, "Test", ".length = " & $iLength) Local $checkBox Local $oFrame For $i=0 To $iLength-1 $oFrame = _IEFrameGetCollection($oIE, $i) If @error Then MsgBox(0, "d", @error) EndIf If(IsObj($oFrame)) Then If (_IEGetObjById($oFrame, "isAgeSelected")) Then If Not $checkBox.checked Then $checkBox.checked = True EndIf ExitLoop EndIf EndIf Next ;_IEAction($input, "click") ;;;gives an error in the previous statement only!!!!! ; User's COM error function. ; After SetUp with ObjEvent("AutoIt.Error", ....) will be called if COM error occurs Func _User_ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_User_ErrFunc It fails on the line "If (_IEGetObjById($oFrame, "isAgeSelected")) Then"
  20. Like
    anthonyjr2 got a reaction from Christian Blackburn in Can't get InputBox with custom Height horizontally centered   
    ;Needed to get usable screen area #include <WinAPI.au3> ;$Usable_Screen_Area[3] = screen height minus the taskbar on the current screen which may or may not have a taskbar Local $Usable_Screen_Area = _GetDesktopArea() ;The M2 means a 1-2 character value is required, $Usable_Screen_Area[3] is the screen's height minus the taskbar if there's a taskbar on the current screen $Response = InputBox("Simulator", "Please enter the index you'd like to simulate?" & @CR & $Options, "", " M2", -1, $Usable_Screen_Area[3],Default, 0) Have you tried this? I can't really test it because I don't have the desktop area part of your code.
    EDIT: I tested it, seems to work.
  21. Like
    anthonyjr2 reacted to mLipok in Future of JavaApplets   
    I hope there is another way.
    No problem. I also not challenging you.
    I was just hope you know this, but the problem was in my poor description.
     
  22. Like
    anthonyjr2 got a reaction from GeneNight in ImageSearch I need it faster   
    You can click edit underneath a post to change it. Bottom of each post next to the quote button.
  23. Like
    anthonyjr2 got a reaction from BrewManNH in How do i write a virus to hack jos his computer   
    I foresee this going poorly for you in multiple ways.
  24. Like
    anthonyjr2 reacted to benners in [Solved] Concatenating two column-based arrays   
    You could Redim the largest array to account for the extra columns in the smallest array and use _ArrayColInsert in a loop to add them together or something like below. Will only work work with 1D array, I think
    #include <Array.au3> local $array1[1][10] = [[0]] local $array2[1][30] = [[1]] _ArrayTranspose($array1) _ArrayTranspose($array2) _ArrayConcatenate($array1, $array2) _ArrayTranspose($array1) _ArrayDisplay($array1)  
  25. Like
    anthonyjr2 got a reaction from SkysLastChance in Format Cell as Date *3/14/2001   
    You should be able to do
    $oExcel.Activesheet.range("A1:L1").NumberFormat = "yyyy-mm-dd" For that specific date format.
×
×
  • Create New...