Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/03/2012 in all areas

  1. Look up, I rewrote it so that it works. Instead of running Internet Explorer, I used the _IECreate function to start the browser and created the correct browser object ($objIE) that _IEPropertyGet needs. The rest of your script shouldn't be affected because I got the Window handle just after creating the browser window, and it's still put into the variable $ie9handle.
    1 point
  2. You have created 2 edit controls in the same location on the GUI, and 2 group controls as well, fix that and see if it works better.
    1 point
  3. It appears as though {ESC} likley just set the window attribute to hidden, rather than closes it. If this is the case you can use: Run(@ComSpec & " /c " & "C:\BGInfo\Bginfo.lnk", @TempDir, @SW_HIDE) $Title = "BGInfo" WinWait($Title, "", 60) WinSetState ($Title, "", @SW_HIDE) Best to check if this is so first though. Run the program normally and hit {ESC} to close it. Then run: $state=WinGetState($Title) If BitAnd($state, 2) Then MsgBox(0,"Visible?","Visible: True") Else MsgBox(0,"Visible?","Visible: False") EndIf If the state comes back hidden the above code should work. Otherwise it'll require a retry loop to get the {ESC} key approach to work properly in the event focus is stolen.
    1 point
  4. There is one more small bug. I have not position properties in my scite session file, so the gui shown only with the title visible . You should add “default” for GetProperty function: Func _GetProperty(ByRef $Var, $Config, $Property, $Which = 0, $Rev = 0, $Default = '') If $Default = '' Then $Default = $Var Local $Test = StringRegExp($Config, 'Q' & $Property & 'E=([^v]+)', 1) If @error Then $Var = $Default Return SetError(1) EndIf Switch StringLower($Which) Case "fore", "back" ; Foreground, Background color $Test = StringRegExp($Test[0], '(?i)'&$Which&':#([[:xdigit:]]+)', 1) Case "#" ; just the color $Test = StringRegExp($Test[0], '#([[:xdigit:]]+)', 1) EndSwitch If @error Then $Var = $Default Return SetError(2) EndIf If $Rev Then $Test[0] = _Rev($Test[0]) $Var = $Test[0] Return EndFunc and then get the position vars like this: If FileExists($SciTE_Session) Then $Properties = FileRead($SciTE_Session) $SciteConfig = $Properties & @CRLF _GetProperty($UI_LEFT, $SciteConfig, "position.left", 0, 0, -1) _GetProperty($UI_RIGHT, $SciteConfig, "position.top", 0, 0, -1) _GetProperty($UI_WIDTH, $SciteConfig, "position.width", 0, 0, 700) _GetProperty($UI_HEIGHT, $SciteConfig, "position.height", 0, 0, 350) _GetProperty($Maximize, $SciteConfig, "position.maximize", 0, 0, 0) Else $UI_LEFT = -1 $UI_RIGHT = -1 $UI_WIDTH = 700 $UI_HEIGHT = 350 $Maximize = 0 EndIf BTW, as you can see, i changed a little bit the hight to height, it's just spelling mistake .
    1 point
  5. First of all, you cannot take a bunch of separate files on a website and download them as a single zip file. However, you can open the page, get a list of all the links and download them. For my example below, I made it check if the link has an extension. If it does not have an extension, then it is leading to a different directory, so it won't attempt to download something that is not there. #include <File.au3> #include <Array.au3> #include <IE.au3> Global $tempLink, $drive, $dir, $file, $ext Local $oIE = _IECreate("ftp://ibiblio.org/pub/multimedia/mutopia/BachJS/BWV16/Cantata_16_no_5/") Local $oLinks = _IELinkGetCollection($oIE) Local $iNumLinks = @extended DirCreate(@DesktopDir & "\Downloads") For $oLink In $oLinks $tempLink = $oLink.href _PathSplit($tempLink, $drive, $dir, $file, $ext) If $ext <> "" Then Inetget ($tempLink, @DesktopDir & "\Downloads\" & $file & "." & $ext) EndIf Next
    1 point
  6. No, you're looking in the right place but the wrong direction. You said you wanted to use C#, so I assume you know enough about Visual Studio to follow this. [COMVisible(true)] public class MyCOMClass { public string GetMyString(string someparameter) { return someparameter; } } Compile this to "mydll.dll". Then call "regasm.exe /codebase mydll.dll". In AutoIt, $obj = ObjCreate("mydll.MyCOMClass") $mystring = $obj.GetString("Hello!") One or more of these steps may need tweaking, but I hope I've at least given you a step in the right direction.
    1 point
×
×
  • Create New...