-
Posts
5,295 -
Joined
-
Last visited
-
Days Won
1
Everything posted by weaponx
-
Can you provide an example of a feed like this?
-
Very cool. I am confused by the code a bit but I have some suggestions to take it to the next level. -Directional movement based on mouse position -Speed modifier -Size jitter -Nebula background image -Eliminate stars along X and Y axis, they seem to reduce the "effect" -TIE Fighters -Rocks that when split when fired at, and then those fragments split when fired at, etc...
-
http://www.autoitscript.com/forum/index.php?showtopic=58836
-
I hope so. Pretty much every answer exists in this topic concerning XML, the same general questions keep getting asked over and over.
-
This format is correct, it's just not indented properly.
-
Hash (associative array) and scripting.dictionary?
weaponx replied to az2000's topic in AutoIt General Help and Support
This is why you can just put some error checking in your script. If the object can't be created, alert the user to download the Windows Script runtime. http://www.microsoft.com/downloads/details...;displaylang=en -
Is there better way to write this function?
weaponx replied to E1M1's topic in AutoIt General Help and Support
I'm not sure if you're saying it's wrong but it works for me. Red 0xff0000 -> Cyan 0x00ffff Green 0x00ff00 -> Magenta 0xff00ff Blue 0x0000ff -> Yellow 0xffff00 -
Is there better way to write this function?
weaponx replied to E1M1's topic in AutoIt General Help and Support
ConsoleWrite(_InvertColor(0x000000)) Func _InvertColor($iColor) Return 0xFFFFFF - $icolor EndFunc ;==>_InvertColor -
#545172 http://www.autoitscript.com/forum/index.ph...mp;#entry534828 I have posted all of these at some point. $original = "20080613104425.484375-240" ;Convert WMI date to YYYY/MM/DD HH:MM:SS $new = StringRegExpReplace($original, "\A(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(?:.*)","$1/$2/$3 $4:$5:$6") debug($new) ;Convert WMI date to MM/DD/YYYY HH:MM:SS $new = StringRegExpReplace($original, "\A(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(?:.*)","$2/$3/$1 $4:$5:$6") debug($new) ;Convert YYYYMMDD.RRR to MM/DD/YYYY Rev. RRR $original = "20080811.016" $new = StringRegExpReplace($original, "\A(\d{4})(\d{2})(\d{2})\.(\d{3})","$2/$3/$1 Rev. $4") debug($new) ;Convert YYYY/MM/DD to MM/DD/YYYY $original = "1980/04/30" $new = StringRegExpReplace($original, "\A(\d*)/(\d*)/(\d*)","$2/$3/$1") MsgBox(0,"","Before: " & $original & @CRLF & "After: " & $new) debug($new) ;Convert MM/DD/YYYY to YYYY/MM/DD $original = "04/30/1980" $new = StringRegExpReplace($original, "\A(\d*)/(\d*)/(\d*)","$3/$1/$2") MsgBox(0,"","Before: " & $original & @CRLF & "After: " & $new) debug($new) ;Convert YYYYMMDDHHMMSS to YYYY-MM-DD HH:MM:SS $original = "20090415153030" $new = StringRegExpReplace($original, "\A(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(?:.*)","$1-$2-$3 $4:$5:$6") debug($new) ;Phone number format $objRegEx = ObjCreate("VBScript.RegExp") $objRegEx.Global = 1 $objRegEx.Pattern = "(\d{3})-(\d{3})-(\d{4})" $strSearchString = "555-123-4567" $strNewString = $objRegEx.Replace($strSearchString, "($1) $2-$3") debug($strNewString) ;Phone number format $test = StringRegExpReplace($strSearchString, "(\d{3})-(\d{3})-(\d{4})", "($1) $2-$3") debug($test) Func debug($var) If IsArray($var) Then For $X = 0 to Ubound($var)-1 ConsoleWrite("[" & $X & "]: " & $var[$X] & @CRLF) Next Else ConsoleWrite($var) EndIf ConsoleWrite(@CRLF) EndFunc
-
A little late but... $d = StringFormat("%i%02i%02i",@YEAR,@MON,@MDAY) MsgBox(0,"",$d)
-
Some questions from a rookie
weaponx replied to mecatronic's topic in AutoIt General Help and Support
AutoIt isn't object oriented per-se, what you are seeing are COM objects created by ObjGet() or ObjCreate(). You won't get much support for these objects here and you are better off using Google. -
Return It's used in the majority of the examples in the help file. Read it.
-
Using icons larger than 32x32 pixel in buttons?
weaponx replied to supersonic's topic in AutoIt General Help and Support
I think there may be a problem in the call to _GUICtrlButton_SetImage when you specify the icon id to extract. In that function there is a call to _WinAPI_ExtractIconEx which always returns an error on an *.ico file. -
Using icons larger than 32x32 pixel in buttons?
weaponx replied to supersonic's topic in AutoIt General Help and Support
This code displays a 48x48 icon for me. #include <GUIConstantsEx.au3> #include <GuiButton.au3> #include <WindowsConstants.au3> GUICreate("Buttons", 300, 300) GUISetState() $btn = GUICtrlCreateButton("Button1", 10, 10, 64, 64, $BS_ICON) _GUICtrlButton_SetImage($btn, @DesktopDir & "\106.ico") While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd -
Using icons larger than 32x32 pixel in buttons?
weaponx replied to supersonic's topic in AutoIt General Help and Support
Did you look in the "user defined functions" in the help file? #Include <GuiButton.au3> _GUICtrlButton_SetImage($hWnd, $sImageFile[, $nIconId = -1[, $fLarge = False]]) -
Look up Opt() with MouseCoordMode
-
Can an AutoIT exe run and then delete itself
weaponx replied to dazza's topic in AutoIt General Help and Support
This question has been asked SO MANY TIMES. Look in the FAQ at the top of this forum or do a search. -
#include <INet.au3> _INetGetSource ( $s_URL )
-
Get Object for Windows Update
weaponx replied to gfunk999's topic in AutoIt General Help and Support
This one is a pain in the ass, the onsubmit property always returns empty: #include <IE.au3> #include <array.au3> $oIE = _IEAttach("Download") ;http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=28e2fdb2-1aa5-4c84-8255-b3142ca2fe85 $oForm = _IEFormGetObjByName ($oIE, "quickCheck") ConsoleWrite(ObjName($oForm) & @CRLF) ConsoleWrite($oForm.onsubmit & @CRLF) ;EMPTY ConsoleWrite($oForm.getAttributeNode("onsubmit").value & @CRLF) ;CORRECT -
How to get $x to be random multiples of 24
weaponx replied to frew's topic in AutoIt General Help and Support
Use an array. $a[4] = [66, 90, 114, 138] MsgBox(0,"",$a[Random(0,3,1)]) -
$str = "key=value" MsgBox(0,"",StringLeft($str,StringInStr($str,"=")-1) & @CRLF & StringTrimLeft($str,StringInStr($str,"=")))
-
You can't use the same increment variable for the inner and outer loop. Use $i for the outer and $v for the inner or something like that.
-
Get Object for Windows Update
weaponx replied to gfunk999's topic in AutoIt General Help and Support
The links are anchor elements with a child div containing the text value, they don't have the typical text attribute. #include <IE.au3> $oIE = _IEAttach ("Microsoft Update") ;attaching windows update after Express button is pressed $oIFRAME = _IEFrameGetObjByName ($oIE, "eContent") $oLinks = _IELinkGetCollection ($oIFRAME) $iNumLinks = @extended $num = 0 ;MsgBox(0, "Link Info", $iNumLinks & " links found") For $oLink In $oLinks $num = $num + 1 If StringInStr($oLink.id, "aTitle") Then ;ConsoleWrite($num & " " & $oLink.href & ", Id: " & $oLink.id & @CRLF) ;$div = $oLink.innerHTML $div = $oLink.firstChild ConsoleWrite($div.innerText & @CRLF) EndIf Next -
Get current ID3 tag from winamp
weaponx replied to Didonet's topic in AutoIt General Help and Support
First thing, _SendMessage is no longer in Misc.au3, it's in SendMessage.au3. Second, AutoIt doesn't like this call: $result3 = DllCall("user32.dll","int","GetWindowThreadProcessId","hwnd",$winampHWND,"int_ptr", $PID) $PID = $result3[2] You can just cheat and use this: $PID = ProcessExists("winamp.exe")