Jump to content

MuffinMan

Active Members
  • Posts

    144
  • Joined

  • Last visited

Reputation Activity

  1. Like
    MuffinMan reacted to ptroy in Any other method besides Shell.Windows for creating _IEAttach browser object?   
    Hi!
     
    I had the same problem (and was pretty much ready to give up - actually it was worse than that).  But I tried another approach.  Let me explain what I am trying to do, and what I found that seems to work.
    - I wanted to close all existing open internet explorer windows
    ; Close all open internet explorer windows sleep(1000) Local $IEWindowList = WinList() ;_ArrayDisplay($IEWindowList) Local $WindowCounter = $IEWindowList[0][0] While $WindowCounter >= 0    If 0 <> StringInStr($IEWindowList[$WindowCounter][0], "Internet Explorer") Then       ConsoleWrite("*** Closing Internet Explorer Applications using WinList approach - " & $IEWindowList[$WindowCounter][0] & @CRLF)       WinKill($IEWindowList[$WindowCounter][1])    Endif    $WindowCounter = $WindowCounter - 1 WEnd - I wanted to use _IEAttach but got the same error that you got (while using citrix iwth autoit installed in portable mode);
      I looked at the line in IE.au3 and found the same problem that you found
    - I am guessing that the com object reference created by ObjCreate is the same reference returned by _IEAttach;  I am hoping to verify that soon.  So, I decided to directly create an InternetExplorer.Application com object.  Note that it does not always suceed the first time so I have it in a loop until it does succeed.
    ; Try to create internet explorer automation object (which I believe to also be a com object) ; - It doesn't always succeed the first time so I repeat until it succeeds sleep(1000) Local $IEWindowComObject = ObjCreate("InternetExplorer.Application") while @error <> 0    ConsoleWrite("*** Just attempted to create internet explorer com object " & @error & @CRLF)    sleep(1000)    $IEWindowComObject = ObjCreate("InternetExplorer.Application") WEnd ; Make it visible and go to ipad and then wait until the window is read $IEWindowComObject.Visible = true; $IEWindowComObject.navigate("https://www.google.ca") If @error then    $IEWindowComObject.Quit    Return EndIf While 1    If $IEWindowComObject.readyState = "complete" or $IEWindowComObject.readyState = 4 then ExitLoop    sleep(1000) WEnd - I needed the title to determine the state the window is open; in my case there are actually two possibilities
    ; Get window handle, needed to get the title, of new internet explorer window $IEWindowList = WinList() ;_ArrayDisplay($IEWindowList) $WindowCounter = $IEWindowList[0][0] Local $IEWindowHandle = 0 While $WindowCounter >= 0 AND $IEWindowHandle = 0    If 0 <> StringInStr($IEWindowList[$WindowCounter][0], "Internet Explorer") Then       ConsoleWrite("*** Found Internet Explorer window - " & $IEWindowList[$WindowCounter][0] & @CRLF)       $IEWindowHandle = $IEWindowList[$WindowCounter][1]    Endif    $WindowCounter = $WindowCounter - 1 WEnd ; Get window title Local $IEWindowTitle = "" IF $IEWindowHandle <> 0 Then    $IEWindowTitle = WinGetTitle($IEWindowHandle) EndIf ;_ArrayDisplay($IEWindowList) sleep(5000) ConsoleWrite($IEWindowTitle & @CRLF) - As I mentioned before, I think that $IEWindowComObject is the value that should have been returned by _IEAttach if it worked.
    If I am correct about this, that the com object reference is the reference returned by _IEAttach when it works, it would be extremely helpful if the documentation was modified to indicate this.
    All the best . . .
    Phil Troy
  2. Like
    MuffinMan reacted to JLogan3o13 in student   
    In the future, when a Mod steps into a thread to request more information, please follow the route of common sense and wait until they say one way or another rather than speaking for us.
  3. Like
    MuffinMan got a reaction from argumentum in (+n) + (-n) + (-n) = baloney ???? [SOLVED]   
    "Pence Conversion" is a VERY different thing in the US!
  4. Like
    MuffinMan got a reaction from kylomas in (+n) + (-n) + (-n) = baloney ???? [SOLVED]   
    "Pence Conversion" is a VERY different thing in the US!
  5. Like
    MuffinMan got a reaction from czardas in (+n) + (-n) + (-n) = baloney ???? [SOLVED]   
    "Pence Conversion" is a VERY different thing in the US!
  6. Like
    MuffinMan got a reaction from coffeeturtle in Open browser but no visibly   
    True fact: You are not making many friends here.  And you have already been given the answer.
    Check this page for some examples that may help you on your journey.
  7. Like
    MuffinMan reacted to ViciousXUSMC in Beginners problem   
    With VPN are you not getting access to an inside address that you otherwise do not have access too?
    All that matters is that you know an internal IP you can ping, not the IP  your connecting with.
     
    Else if your checking your adapter IP's and looking to see if you have a VPN IP usually they are in the same subnet range so you can check for the "general" IP instead of the exact one.
     
    Example: 
    Local IP = 192.168.1.15
    VPN IP = 10.0.15.63
    VPN Check If IP = 10.X.X.X then VPN is connected
  8. Like
    MuffinMan reacted to l3ill in Scripting Teamspeak   
    In my experience Shellexecute works better for programs where Run is more for batch files and commandline stuff.
    Maybe a Dev will show up and elaborate...
    I just go for what works not always knowing why
  9. Like
    MuffinMan got a reaction from Enuma in Download & Check HWID Error   
    Yeah, comment out the FileWrite and FileClose lines and try it again.
  10. Like
    MuffinMan reacted to TheDcoder in FileExists issue trying to distinguish between a 32 bit and a 64 bit computer version   
    Putting an end to this madness:
    If Is32bit() Then ; If the computer is 32 bit... ; Do something if the computer is 32 bit. Else ; If the computer is not 32 bit... ; Do something if the computer is 64 bit. EndIf Func Is32bit() Return @OSArch = "X86" EndIf Just copy paste the last 3 lines at the end of your code to use the Is32bit function.
  11. Like
    MuffinMan reacted to orbs in catching downloads in an IE object   
    The lack of ability to automate the download in IE has been a frustration for me, and for others too I bet. Implementing a custom download manager is beyond my abilities. If you can get it to work, I'll be happy to know.
    now for a more practical and efficient solution - how about you create the package once, and deploy it along with your script.
    if your script always checks the same apps in the ninite package, then why bother redo it all again and again for every machine, waste time and bandwidth, tackle all the issues you mention.
    this is also good for version control. When you get a ninite package for each machine, as you do now, you have no control of which version of which app is deployed on which machine. When you create the package once, you know exactly which version of which app you have. You need only recreate the package when newer versions of apps are available in ninite. No shorter interval than once a month, I dare say. If you also handle updates to ninite-deployed apps, this kind of version control is very useful.
  12. Like
    MuffinMan reacted to spudw2k in Send a command to USB device (Scanner) to keep it awake   
    I'm reminded of a(n) (allegedly) good old opsec story where a new computer system was installed at a Doctors office that would time-out, as designed, but undesirably by the users.  Their solution?  Insert and pen cap into the keyboard so it contiunually presses a key (ctrl for example) and keeps he computer alive.
    If you leave paper in there does it prevent it from going to sleep? Me thinks a piece of tape is in your future, or just leave a piece of paper in it when you're done.


    I must caution....the lamp turns off for a good reason.  Leaving it on all the time will substantially reduce the lifetime of the scanner.  Be prepared to replace the scanner hardware more frequently and have a backup.
  13. Like
    MuffinMan got a reaction from Dariorio in Need help with with basic script (new to autoIt)   
    OK, so try this instead - it's the page I used to test with:
    Change your color to:
    Global $color1 = 0xFFFB00 Run the code and then point your browser up to this page:
    https://nurturingacreativeworld.files.wordpress.com/2014/12/195057182_640.jpg
    The middle yellow square is the target color.
     
  14. Like
    MuffinMan got a reaction from Dariorio in Need help with with basic script (new to autoIt)   
    I wasn't able to visit your website due to our web filters at work, but I did notice a couple of issues with your code.  Try the changes below and see if it works better for you:
    HotKeySet("{F4}", "MyExit") $pos = MouseGetPos() Global $color1 = 0xDEDEDE Global $color2 = PixelGetColor ; Not correct syntax and color needs to be grabbed after each mouse movment While(1) $posx = random(4,1915) $posy = random(184,1014) MouseMove( $posx, $posy) sleep(1000) $pos = MouseGetPos() ; You weren't updating your mouse pos after the mouse was moved $color2 = PixelGetColor($pos[0], $pos[1]) If $color1 == $color2 Then ; You weren't valuing $color2 properly before the While Msgbox(0,"Got it", "Thats my color") ; added to help troublehsoot MouseClick("Left") sleep(200) Else sleep(100) EndIf WEnd func MyExit() Exit EndFunc  
  15. Like
    MuffinMan reacted to JLogan3o13 in Monitoring the text in the news box.   
    @zxc3 you could not have provided less information if you'd been trying. You have been here long enough to know you need to provide us with a detailed description of what you're trying to accomplish, along with your code (working or not), rather than asking us to first guess at what you're trying to do and then solve it for you.
  16. Like
    MuffinMan reacted to JLogan3o13 in Include source after copmpiling   
    Hi, LuxiVDN. This is how I do it, in case I do something stupid and delete my source (not that that ever happens) Using this method, the source file only gets put onto the machine when you want it, not every time you run the script.

    You can make the switch for your command line anything you would like. In this case, if you execute "MySource.exe" /Extract from the Run line, it will extract the source code and then exit without actually running through the script.


    If StringInStr($cmdlineRaw, "/Extract") Then FileInstall("C:MySource.au3", @TempDir & "MySource.au3", 1) Exit EndIf
  17. Like
    MuffinMan reacted to alien4u in Why this script does not work at startup unless i execute it with double click ?   
    Really? this is a Joke right? OS behavior is the same... I'm done with you.

    I wish you best of luck and also to your therapist.

    Regards
    Alien.
  18. Like
    MuffinMan got a reaction from orichec in IECreate not working using Excelsheet values   
    Try replacing your _ExcelRAngeCopyPaste line with this:
    $URL = _Excel_RangeRead ($oWorkbook1, Default, "C1") Make use of Msgbox to display your variables and it will help you troubleshoot any issues you are having.
  19. Like
    MuffinMan got a reaction from spudw2k in Trying to SaveCred with Net Use   
    I found something interesting on the web about using net use with the /user: and /savecred options.  Hit the link below for the full source, but the meat of the conversion is copied below in italics
    From: https://social.technet.microsoft.com/Forums/scriptcenter/en-US/8fc5d667-c1f9-4670-a6e1-3ba2c5e8603d/net-use-savcred-user-conflicting-switches?forum=ITCG
    Maybe that will help.
  20. Like
    MuffinMan got a reaction from czardas in Old Autoit 2 need help to remove   
    Have you tried disabling / uninstalling Comodo yet?  Try it and see if the green boxes / errors goes away.
  21. Like
    MuffinMan reacted to JohnOne in [Closed] How to Change a Setting in Firefox, Without Using the GUI   
    Seems to me like you're not interested in anything anyone has to say, I'm wondering why your question was not just "Does FF expose COM methods?"
    It does not, there would be a UDF that uses it easily found if it did.
    So why not just do that?
  22. Like
    MuffinMan reacted to guinness in @programfilesdir and "Program Files(x86)"   
    Func _ProgramFilesDir() Local $ProgramFileDir Switch @OSArch Case "X32" $ProgramFileDir = "Program Files" Case "X64" $ProgramFileDir = "Program Files (x86)" EndSwitch Return @HomeDrive & "\" & $ProgramFileDir EndFunc ;==>_ProgramFilesDirh
  23. Like
    MuffinMan got a reaction from pcjunki in csv editing   
    You can do that directly in Excel...
    Select cells you want formatted in this way. Right click and select "Format Cells..." Select the "Number" Tag, and scroll down to "Custom" in the category list. Type "00000000" into the Type field. Everything will be zero padded to 8 digits.
  24. Like
    MuffinMan reacted to ViciousXUSMC in Automate Activation of Game Key for Steam Client   
    Well I took a (short) look at IUIAutomation this weekend and got Autoit to find and activate the Steam Client window as the Info Finder tool pretty much gave me that part of the code.  It does not let me see any of the elements inside of the window like the "file" options.  I think based on some of the examples that this maybe normal behavior and I need to use the _UIA_DumpThemAll() to get my elements.
    I ran out of time before I figured out all the stuff to plug into the code and how to find the results.  It will take some more time for sure but in the end I should learn a new valuable skill.
  25. Like
    MuffinMan got a reaction from Siryx in Splitting array values like stringsplit   
    Try this...
    For $i = 0 To UBound($array) - 1 $namen = StringSplit($array[$i][0], " ") $vorname = $namen[1] $nachname = $namen[$namen[0]] MsgBox(0, "",$vorname) MsgBox(0, "",$nachname) NextOR change this line so that you only grab one column
    Global $array = _Excel_RangeRead($oWorkbook, "Tabelle1", "A2:A704")  
×
×
  • Create New...