
death pax
Active Members-
Posts
108 -
Joined
-
Last visited
Everything posted by death pax
-
Many thanks, that appears to be what i needed
-
Just wondering... is there anyway of updating another programs gui styles? Ive looked but didnt see anything in the hlp file many thanks -pax
-
Messenger Plus Custom Sound Exporter
death pax replied to death pax's topic in AutoIt Example Scripts
Not sure that its needed, but since i needed to export sounds again.. and with the advent of msg plus live.... an updated exporter to work with plus live CODE; ---------------------------------------------------------------------------- ; ExportPlusSounds.au3 ; AutoIt Version: v3.2.1.14 (beta) ; Author: Death Pax <death_pax@msn.com ; ; Script Function: ; Export Custom Messenger Plus Sounds ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here dim $Folder dim $file dim $logfile dim $Successful dim $size if @OSTYPE <> "WIN32_NT" Then MsgBox(16,"Error","This Script only Supports Windows NT Operating Systems(NT/2000/XP)") EndIf $Folder=FileSelectFolder("Select Destination Folder","",1) $logfile=FileOpen($Folder&"\MsgPlusExport.log",10) FileWriteLine($logfile,"Initiating Exporting Sequence") if FileChangeDir("C:\Documents and Settings\All Users\Application Data\Messenger Plus!\Custom Sounds")<> 1 Then msgbox(-1,"","Workingdir not changed correctly") EndIf $size = DirGetSize("C:\Documents and Settings\All Users\Application Data\Messenger Plus!\Custom Sounds",1) $Successful=1 FileWriteLine($logfile,"Exporting "&$size[1]&" files.") For $i= 1 to $size[1] $var = RegEnumKey("HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\CustSounds", $i) $Name=RegRead("HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\CustSounds\"&$var,"Name") If @error <> 0 then ExitLoop Filecopy(@workingdir&"\#"&$var&".dat",$Folder&"\"&$name&".mp3",9) $Successful=$Successful+1 FileWriteLine($logfile,"Exporting (file #"&$i&"/"&$size[1]&")"&@workingdir&"\#"&$var&".dat"&"->"&$Folder&"\"&$name&".mp3 Successful!") Next Exit -
Winamp Title overlay using larry's text regions #include <GUIConstants.au3> #NoTrayIcon AutoItSetOption("TrayMenuMode",1) dim $Title,$OldTitle dim $song dim $hwnd $exititem = TrayCreateItem("Exit") TraySetState() $hwnd = GUICreate("Winamp Tool",500,20,(@DesktopWidth-550),1,$WS_POPUP,BitOR($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW)) GUISetBkColor(0xFF0000) GUISetState() While 1 $msg = TrayGetMsg() Select Case $msg = $exititem ExitLoop EndSelect $OldTitle=$Title AutoItSetOption("WinTitleMatchMode", 4) $Title=WinGetTitle("classname=Winamp v1.x") if $OldTitle<>$Title then $song=ParseTitle($Title) $rgn = CreateTextRgn($hwnd,$song,20,"Arial",1000) SetWindowRgn($hwnd,$rgn) EndIf WEnd Func ParseTitle($Title) $loc=StringInstr($Title,". ") $ParsedTitle=StringTrimLeft($Title,$loc+1) $loc=StringInstr($ParsedTitle," - Winamp",0,-1) $ParsedTitle=StringLeft($ParsedTitle,$loc) Return $ParsedTitle EndFunc Func SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc ;Func CombineRgn(ByRef $rgn1, ByRef $rgn2) ; DllCall("gdi32.dll", "long", "CombineRgn", "long", $rgn1, "long", $rgn1, "long", $rgn2, "int", 2) ;EndFunc Func CreateTextRgn(ByRef $CTR_hwnd,$CTR_Text,$CTR_height,$CTR_font="Microsoft Sans Serif",$CTR_weight=1000) Local Const $ANSI_CHARSET = 0 Local Const $OUT_CHARACTER_PRECIS = 2 Local Const $CLIP_DEFAULT_PRECIS = 0 Local Const $PROOF_QUALITY = 2 Local Const $FIXED_PITCH = 1 Local Const $RGN_XOR = 3 If $CTR_font = "" Then $CTR_font = "Microsoft Sans Serif" If $CTR_weight = -1 Then $CTR_weight = 1000 Local $gdi_dll = DLLOpen("gdi32.dll") Local $CTR_hDC= DLLCall("user32.dll","int","GetDC","hwnd",$CTR_hwnd) Local $CTR_hMyFont = DLLCall($gdi_dll,"hwnd","CreateFont","int",$CTR_height,"int",0,"int",0,"int",0, _ "int",$CTR_weight,"int",0,"int",0,"int",0,"int",$ANSI_CHARSET,"int",$OUT_CHARACTER_PRECIS, _ "int",$CLIP_DEFAULT_PRECIS,"int",$PROOF_QUALITY,"int",$FIXED_PITCH,"str",$CTR_font ) Local $CTR_hOldFont = DLLCall($gdi_dll,"hwnd","SelectObject","int",$CTR_hDC[0],"hwnd",$CTR_hMyFont[0]) DLLCall($gdi_dll,"int","BeginPath","int",$CTR_hDC[0]) DLLCall($gdi_dll,"int","TextOut","int",$CTR_hDC[0],"int",0,"int",0,"str",$CTR_Text,"int",StringLen($CTR_Text)) DLLCall($gdi_dll,"int","EndPath","int",$CTR_hDC[0]) Local $CTR_hRgn1 = DLLCall($gdi_dll,"hwnd","PathToRegion","int",$CTR_hDC[0]) Local $CTR_rc = DLLStructCreate("int;int;int;int") DLLCall($gdi_dll,"int","GetRgnBox","hwnd",$CTR_hRgn1[0],"ptr",DllStructGetPtr($CTR_rc)) Local $CTR_hRgn2 = DLLCall($gdi_dll,"hwnd","CreateRectRgnIndirect","ptr",DllStructGetPtr($CTR_rc)) DLLCall($gdi_dll,"int","CombineRgn","hwnd",$CTR_hRgn2[0],"hwnd",$CTR_hRgn2[0],"hwnd",$CTR_hRgn1[0],"int",$RGN_XOR) DLLCall($gdi_dll,"int","DeleteObject","hwnd",$CTR_hRgn1[0]) DLLCall("user32.dll","int","ReleaseDC","hwnd",$CTR_hwnd,"int",$CTR_hDC[0]) DLLCall($gdi_dll,"int","SelectObject","int",$CTR_hDC[0],"hwnd",$CTR_hOldFont[0]) DLLClose($gdi_dll) Return $CTR_hRgn2[0] EndFunc
-
Something i made a while back ; ---------------------------------------------------------------------------- ; Shake Window ; Author: Death Pax <death_pax@msn.com> ; ; Script Function: ; Shake Window ; ; ---------------------------------------------------------------------------- #include <GUIConstants.au3> $Gui_Main = GUICreate("Shake Window", 400, 400) $Button_Shake = GUICtrlCreateButton("Shake Window", 24, 352, 121, 33, 0) $Button_Close = GUICtrlCreateButton("Close Window", 256, 352, 121, 33, 0) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_Close ExitLoop Case $msg = $Button_Shake _ShakeWindow($Gui_Main, 5) Case Else ;;;;;;; EndSelect WEnd Exit Func _ShakeWindow($Window,$ShakeAmount) $Win_pos=WinGetPos($Window) For $i=0 to 20 step 1 WinMove($Window,"", $Win_pos[0],$Win_pos[1]+$ShakeAmount) Sleep(10) WinMove($Window,"", $Win_pos[0]+$ShakeAmount,$Win_pos[1]) Sleep(10) WinMove($Window,"", $Win_pos[0],$Win_pos[1]-$ShakeAmount) Sleep(10) WinMove($Window,"", $Win_pos[0]-$ShakeAmount,$Win_pos[1]) Sleep(10) WinMove($Window,"", $Win_pos[0],$Win_pos[1]) Sleep(10) next EndFunc
-
a quick script i made for my gf... shes a cg artist and is constantly needing to find the hex/rgb values in pictures figured i might as well share it with y'all as well #Include <Constants.au3> #NoTrayIcon opt("TrayMenuMode",1) $aboutitem = TrayCreateItem("About") $exititem = TrayCreateItem("Exit") TraySetState() TraySetToolTip("ColorInfo") While 1 $msg = TrayGetMsg() Select Case $msg = $aboutitem Msgbox(64,"About:","ColorInfo by DeathPax") Case $msg = $exititem ExitLoop EndSelect $pos = MouseGetPos() $color=PixelGetColor ( $pos[0] , $pos[1] ) $Red=BitAND( BitShift($Color, 16), 0xff) $Green=BitAND( BitShift($Color, 8), 0xff) $Blue=BitAND($Color, 0xff) ToolTip("#"&Hex($Color, 6)&@CRLF&"R:"&$Red&@CRLF&"G:"&$Green&@CRLF&"B:"&$Blue) WEnd
-
ill see what i can do ^.^
-
http://www.autoitscript.com/forum/index.ph...amp;mode=linear
-
a bit easier way, code by larry although it isnt all autoit Global $SRCCOPY = 0x00CC0020 Global $leave = 0 HotKeySet("{PAUSE}","leave") SplashTextOn ( "AU3MAG", "" , 100 , 100 , 0, 0, 1 ) $MyhWnd = WinGetHandle("AU3MAG") While Not $leave Sleep(25) MAG() WEnd Func MAG() $MyHDC = DLLCall("user32.dll","int","GetDC","hwnd",$MyhWnd) If @error Then Return $DeskHDC = DLLCall("user32.dll","int","GetDC","hwnd",0) If Not @error Then $xy = MouseGetPos() If Not @error Then $l = $xy[0]-10 $t = $xy[1]-10 DLLCall("gdi32.dll","int","StretchBlt","int",$MyHDC[0],"int",_ 0,"int",0,"int",100,"int",100,"int",$DeskHDC[0],"int",_ $l,"int",$t,"int",20,"int",20,"long",$SRCCOPY) EndIf DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC[0],"hwnd",0) EndIf DLLCall("user32.dll","int","ReleaseDC","int",$MyHDC[0],"hwnd",$MyhWnd) EndFunc Func leave() $leave = 1 EndFunc
-
valik was correct.. i should have guessed it was the windows policies... but it makes me wonder what caused them to be that way to begin with
-
I'm Afraid its not that simple either http://img.photobucket.com/albums/v80/deat...rProperties.jpg
-
Ill upload a screenshot quick... http://img.photobucket.com/albums/v80/death_pax/screen.jpg MSN, an auto it script, my internet connection, and my battery life icon should be in the notification area, at bare minimum
-
This isnt completely for auto it, rather a problem i discover when i was working on a script. I was creating a script with a TrayIcon. The first time i tried it, everything worked fine. But yesterday when i ran the same script again, i discovered that my notification area is gone. No tray icons from any progs, only the current time. Anyone have any ideas? Also in the Taskbar/startmenu properties where you would normally set properties of the notification area is greyed out Edit: Also, on another user account on my comp, the notification area works fine.
-
Ok, problem solved. The problem was that i was trying to bind a new socket rather than using the one i Previosly sent data on... i was under the impression you had to use UDPBind with UdpRcv
-
$g_IP="63.124.142.3" $g_port=8001 UDPStartup() dim $temp $Socket=UdpOpen($g_IP,$g_port) if @Error <> 0 Then Msgbox(0,"",@error) Exit EndIf UDpSend($socket,"\status\") UDPCloseSocket($socket) $socket=UDpBind($g_IP,$g_port) While 1 $data = UDPRecv($socket, 256) If $data <> "" Then MsgBox(0, "UDP DATA", $data, 1) EndIf sleep(100) Wend Func OnAutoItExit() UDPCloseSocket($Socket) UDPShutdown() EndFunc Ethereal Shows: So everything is being sent/recived correctly, but my script isnt showing the recieved data
-
yes but you have to bind it to a port. The port that it needs to bound to....is the port that the data is sent on originally... but that port is randomly selected when you UDpOpen/UDpSend
-
Anybody?
-
I have a small problem with getting udp working $g_IP="63.124.142.3" $g_port=8001 UDPStartup() $socket=UDpOpen($g_IP,$g_port) if @Error <> 0 Then Msgbox(0,"",@error) Exit EndIf UDpSend($socket,"\status\") Func OnAutoItExit() UDPCloseSocket($socket) UDPShutdown() EndFunc This all works fine, i checked with a packet analyzer and it indeed was sent, however how would i go about listening for the response on the same port that this was sent on?
-
I actually did this a while back for a pet project of mine... Byte2Bit... but it was ugly... i ended up writing a per hex value bit table... Func ByteToBit($TheByte) #region -- BitChart local $BitChart[16][2] $BitChart[0][0]="0" $BitChart[1][0]="1" $BitChart[2][0]="2" $BitChart[3][0]="3" $BitChart[4][0]="4" $BitChart[5][0]="5" $BitChart[6][0]="6" $BitChart[7][0]="7" $BitChart[8][0]="8" $BitChart[9][0]="9" $BitChart[10][0]="A" $BitChart[11][0]="B" $BitChart[12][0]="C" $BitChart[13][0]="D" $BitChart[14][0]="E" $BitChart[15][0]="F" $BitChart[0][1]="0000" $BitChart[1][1]="0001" $BitChart[2][1]="0010" $BitChart[3][1]="0011" $BitChart[4][1]="0100" $BitChart[5][1]="0101" $BitChart[6][1]="0110" $BitChart[7][1]="0111" $BitChart[8][1]="1000" $BitChart[9][1]="1001" $BitChart[10][1]="1010" $BitChart[11][1]="1011" $BitChart[12][1]="1100" $BitChart[13][1]="1101" $BitChart[14][1]="1110" $BitChart[15][1]="1111" #endregion -- BitChart for $i=0 to 15 step 1 if $thebyte = $BitChart[$i][0] Then return $BitChart[$i][1] exitloop Else EndIf Next When i rewrote the program, i ended up not even bothering with it, and did everything with Bitwise operators Bitwise operators > using string functions on binary
-
string and number comparison
death pax replied to dark_jedi's topic in AutoIt General Help and Support
$a="foobar" $b=1 if $a==$b Then MsgBox(0,"","Matched") else MsgBox(0,"","Didnt Match") endif oÝ÷ ÚÚºÚ"µÍÌÍØOI][ÝÙÛØ][ÝÂÌÍØLBY ÌÍØIÉÝÉÌÍØ[ÙÐÞ ][ÝÉ][ÝË ][ÝÑYÌÎNÝX]Ú ][ÝÊB[ÙBÙÐÞ ][ÝÉ][ÝË ][ÝÓX]ÚY ][ÝÊB[Y <> (not equal to) is for comparisons guess i don't know exactly what you are asking -
How about adding either checkboxes or selecting multiple processes, to kill the dual programs that restart each other
-
awesome! I never really needed to add control over itunes to my script, and since i dont use itunes myself, i probly never would have, but i am glad to see that my original post has inspired a few people ^.^
-
Run Autoit Code In Editbox?
death pax replied to NegativeNrG's topic in AutoIt General Help and Support
no problem ^.^ -
Run Autoit Code In Editbox?
death pax replied to NegativeNrG's topic in AutoIt General Help and Support
yes. #include <GUIConstants.au3> dim $EditContents $Form1 = GUICreate("Edit Box Code", 488, 441, 192, 125) $Edit1 = GUICtrlCreateEdit("", 8, 8, 473, 377) $Button1 = GUICtrlCreateButton("Execute Code", 144, 400, 225, 33, 0) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $EditContents=GuiCtrlRead($Edit1) $EditContents=$EditContents&@CRLF $handle=FileOpen(@TempDir&"\Code.au3",10) FileWrite($handle,$EditContents) FileClose($handle) sleep(50) Run('"'&@ScriptFullPath&'" /AutoIt3ExecuteScript "'&@TempDir&'\Code.Au3"') Case Else ;;;;;;; EndSelect WEnd Exit Note: this code has to be compiled to exe form before you can use it One of the nice functions of Autoit is the fact that you can use any compiled exe the same way you can use autoit3.exe for executing a single line of code, see the "/AutoIt3ExecuteLine" switch in the help file