BAM5 Posted November 20, 2007 Share Posted November 20, 2007 I was bored OK... o and if anyone has the sound file please e-mail it to me tacoman9001@yahoo.com While 1 $ran = Random (10, 500, 1) $pos = MouseGetPos () ToolTip ("HEY LISTEN", $pos[0], $pos[1], "HEY LISTEN", 1, 5) Sleep ($ran) WEnd [center]JSON Encoding UDF[/center] Link to comment Share on other sites More sharing options...
Nahuel Posted November 20, 2007 Share Posted November 20, 2007 Link to comment Share on other sites More sharing options...
Generator Posted November 20, 2007 Share Posted November 20, 2007 Not sure what's the use of this..here is a shorter version While 1 ToolTip ("HEY LISTEN", MouseGetPos (0), MouseGetPos (1), "HEY LISTEN", 1, 5) Sleep (Random (10, 500, 1)) WEnd Link to comment Share on other sites More sharing options...
therks Posted November 20, 2007 Share Posted November 20, 2007 Haha, interesting. Gave me an idea... I need that PNG GUI script though.. have to find it... My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
BAM5 Posted November 20, 2007 Author Share Posted November 20, 2007 Haha, interesting. Gave me an idea... I need that PNG GUI script though.. have to find it...lol I know what your thinking [center]JSON Encoding UDF[/center] Link to comment Share on other sites More sharing options...
therks Posted November 20, 2007 Share Posted November 20, 2007 Got it.expandcollapse popup#Include <GDIPlus.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global Const $AC_SRC_ALPHA = 1 Global Const $ULW_ALPHA = 2 _GDIPlus_Startup() $sImg = @ScriptDir & '\Navi.png' $hImage = _GDIPlus_ImageLoadFromFile($sImg) $iWidth = _GDIPlus_ImageGetWidth ($hImage) $iHeight = _GDIPlus_ImageGetHeight($hImage) $iCount = 0 $gui = GUICreate('Navi', $iWidth, $iHeight, Default, Default, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) _SetBitMap($GUI, $hImage, 255) GUISetState() Dim $aText[2] = [ 'Hey!', 'Listen!' ] Global $iTimer = TimerInit() Global $iTextRand = Random(0, 1, 1) Global $iTextTime = Random(3, 5, 1) * 1000 While 1 If GUIGetMsg() = -3 Then Exit $aMouse = MouseGetPos() $iCount += 1 $iX = $aMouse[0] + $iWidth + Cos($iCount / 30) * 40 $iY = $aMouse[1] - ($iHeight * 2) + Sin($iCount / 15) * 20 If TimerDiff($iTimer) > $iTextTime Then ToolTip($aText[$iTextRand], $iX + $iWidth, $iY + $iHeight, '', 0, 0) If TimerDiff($iTimer) > $iTextTime + 1000 Then $iTextRand = Random(0, 1, 1) $iTextTime = Random(3, 5, 1) * 1000 $iTimer = TimerInit() ToolTip('') EndIf EndIf WinMove($gui, '', $iX, $iY) Sleep(10) WEnd Func _SetBitMap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize ) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha" , $iOpacity ) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC (0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC ($hMemDC) EndFuncYou'll need this image:http://www.therks.com/autoit/Navi.png My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
jvanegmond Posted November 20, 2007 Share Posted November 20, 2007 Man, I have no clue what that really means.. but quite funny Saunders. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Sn0opy Posted November 20, 2007 Share Posted November 20, 2007 (edited) it's totally useless. navi is just a small elfe which helpes zelda to find thinks or give him tips. @Saunders: Could you upload the GDIPlus.au3 pls? Edited November 20, 2007 by Sn0opy Link to comment Share on other sites More sharing options...
weaponx Posted November 20, 2007 Share Posted November 20, 2007 I'm thinking hes running the new beta with the gdi functions integrated. Link to comment Share on other sites More sharing options...
Toady Posted November 20, 2007 Share Posted November 20, 2007 LOL navi ftw! www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Sn0opy Posted November 20, 2007 Share Posted November 20, 2007 I modified Saunders version expandcollapse popup#Include <GDIPlus.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global Const $AC_SRC_ALPHA = 1 Global Const $ULW_ALPHA = 2 _GDIPlus_Startup() $sImg = @ScriptDir & '\Navi.png' $hImage = _GDIPlus_ImageLoadFromFile($sImg) $iWidth = _GDIPlus_ImageGetWidth ($hImage) $iHeight = _GDIPlus_ImageGetHeight($hImage) $iCount = 0 $gui = GUICreate('Navi', $iWidth, $iHeight, Default, Default, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) _SetBitMap($GUI, $hImage, 255) GUISetState() Dim $aText[2] = [ '\hey.mp3', '\listen.mp3' ] Global $iTimer = TimerInit() Global $iTextRand = Random(0, 1, 1) Global $iTextTime = Random(3, 5, 1) * 1000 While 1 If GUIGetMsg() = -3 Then Exit $aMouse = MouseGetPos() $iCount += 1 $iX = $aMouse[0] + $iWidth + Cos($iCount / 30) * 40 $iY = $aMouse[1] - ($iHeight * 2) + Sin($iCount / 15) * 20 If TimerDiff($iTimer) > $iTextTime Then SoundPlay(@ScriptDir & $aText[$iTextRand]) ;ToolTip($aText[$iTextRand], $iX + $iWidth, $iY + $iHeight, '', 0, 0) If TimerDiff($iTimer) > $iTextTime + 1000 Then $iTextRand = Random(0, 1, 1) $iTextTime = Random(3, 5, 1) * 1000 $iTimer = TimerInit() ;ToolTip('') EndIf EndIf WinMove($gui, '', $iX, $iY) Sleep(10) WEnd Func _SetBitMap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize ) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha" , $iOpacity ) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC (0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC ($hMemDC) EndFuncDownload these files:http://sascha.kiloswiss.ch/uploads/files/sounds/hey.mp3http://sascha.kiloswiss.ch/uploads/files/sounds/listen.mp3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now