WolfmanTR_ Posted April 20, 2012 Share Posted April 20, 2012 s.a arkadaşlar Traytip 'te Yazı yerine resim çıksın istiyorum,, "programın iconu değil" onun için kodları verebilirmisiniz? Örn: [img]http://img823.imageshack.us/img823/1558/67941797.png[/img] böyle bir resim, solarak veya kayarak çıkacak..! Quote Link to comment Share on other sites More sharing options...
YILMazrail Posted April 20, 2012 Share Posted April 20, 2012 Buyur "@DesktopWidth / 2, 1)" bu bölümdeki 2 ve 1 resmin konumunu ayarlıyor. [code]$IMG_PATH = @ScriptDir & "\Günbatımı.jpg" ;Resmin bulunduğu yer SplashImageOn("Splash Screen", $IMG_PATH, 250, 250, @DesktopHeight, @DesktopWidth / 2, 1) Sleep(3000) ;3 saniye bekle SplashOff()[/code] Quote Link to comment Share on other sites More sharing options...
Mehmet Posted April 20, 2012 Share Posted April 20, 2012 buradaki işinizi görür [code]http://www.tnctr.com/topic/182762-[/code] Quote Link to comment Share on other sites More sharing options...
MAKINCI Posted April 20, 2012 Share Posted April 20, 2012 [quote name='MeHMeTBeN' date='20 April 2012 - 18:20 ' timestamp='1334935206' post='1189602'] buradaki işinizi görür [code]http://www.tnctr.com/topic/182762-[/code] [/quote] Mehmet abi compile ettik eğer koyacağımız resim exenin yanındaysa çalışıyor resmi exenin yanından sildiğimiz zaman sadece exenin ikonu oluyor,resmi neden exenin içine gömemiyoruz ben iki konuyuda denedim sonuç aynı abi... Quote Link to comment Share on other sites More sharing options...
blue_life Posted April 20, 2012 Share Posted April 20, 2012 Resim dosyasının adını Resim.png, ses dosyasının adınıda Muzik.mp3 yapıp, autoit script dosyasının yanına koyunuz. Sonra aşağdıdaki kodları compile edip exeye çeviriniz. Gördüğünüz üzere FileInstall komutuyla ilgili dosyaları autoit içine alıyoruz ve çalıştığında temp klasörüne çıkartıp çalıştırıyoruz. Neyse kolay gelsin... [codebox]#NoTrayIcon #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> Global $Resim = __TempFile(".png") Global $MP3 = __TempFile(".mp3") FileInstall("Resim.png", $Resim, 1) ;Resmi autoit içine alalım FileInstall("Muzik.mp3", $MP3, 1) ;MP3ü autoit içine alalım If FileExists($MP3) = 1 Then SoundPlay($MP3, 0) Global $ResW, $ResH _My_Gui() Sleep(5000) FileDelete($Resim) FileDelete($MP3) Exit 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) $ResW = _GDIPlus_ImageGetWidth($hImage) $ResH = _GDIPlus_ImageGetHeight($hImage) DllStructSetData($tSize, "X", $ResW) DllStructSetData($tSize, "Y", $ResH) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _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) EndFunc ;==>SetBitmap Func _My_Gui() Local $yGUI = GUICreate("", 1, 1, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) _GDIPlus_Startup() Local $yImage = _GDIPlus_ImageLoadFromFile($Resim) SetBitMap($yGUI, $yImage, 255) Local $Gui_X = @DesktopWidth - ($ResW + 5) Local $Gui_Y = @DesktopHeight - ($ResH + 5) Local $Shell_Pos = WinGetHandle("[CLASS:Shell_TrayWnd]") ;CLASS:Progman If $Shell_Pos <> "" Then $Shell_Pos = WinGetPos($Shell_Pos) If UBound($Shell_Pos) = 4 Then If $Shell_Pos[1] < 1 Then If $Shell_Pos[0] > 0 Then $Gui_X = @DesktopWidth - ($Shell_Pos[2] + ($ResW + 5)) Else If $Shell_Pos[0] < 1 Then $Gui_Y = @DesktopHeight - ($Shell_Pos[3] + ($ResH + 5)) EndIf EndIf EndIf WinMove($yGUI, "", $Gui_X, $Gui_Y, $ResW, $ResH) GUISetState(@SW_SHOW) EndFunc ;==>_My_Gui Func __TempFile($s_FileExtension = ".tmp", $s_DirectoryName = @TempDir, $s_FilePrefix = "~", $i_RandomLength = 7) ; Check parameters If IsKeyword($s_FilePrefix) Then $s_FilePrefix = "~" If IsKeyword($s_FileExtension) Then $s_FileExtension = ".tmp" If IsKeyword($i_RandomLength) Then $i_RandomLength = 7 If Not FileExists($s_DirectoryName) Then $s_DirectoryName = @TempDir ; First reset to default temp dir If Not FileExists($s_DirectoryName) Then $s_DirectoryName = @ScriptDir ; Still wrong then set to Scriptdir ; add trailing \ for directory name If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" ; Local $s_TempName Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return $s_TempName EndFunc ;==>__TempFile [/codebox] Quote Link to comment Share on other sites More sharing options...
promes Posted September 4, 2012 Share Posted September 4, 2012 (edited) [quote name='blue_life' timestamp='1334939430' post='1189637'] Resim dosyasının adını Resim.png, ses dosyasının adınıda Muzik.mp3 yapıp, autoit script dosyasının yanına koyunuz. Sonra aşağdıdaki kodları compile edip exeye çeviriniz. Gördüğünüz üzere FileInstall komutuyla ilgili dosyaları autoit içine alıyoruz ve çalıştığında temp klasörüne çıkartıp çalıştırıyoruz. Neyse kolay gelsin... [codebox]#NoTrayIcon #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> Global $Resim = __TempFile(".png") Global $MP3 = __TempFile(".mp3") FileInstall("Resim.png", $Resim, 1) ;Resmi autoit içine alalım FileInstall("Muzik.mp3", $MP3, 1) ;MP3ü autoit içine alalım If FileExists($MP3) = 1 Then SoundPlay($MP3, 0) Global $ResW, $ResH _My_Gui() Sleep(5000) FileDelete($Resim) FileDelete($MP3) Exit 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) $ResW = _GDIPlus_ImageGetWidth($hImage) $ResH = _GDIPlus_ImageGetHeight($hImage) DllStructSetData($tSize, "X", $ResW) DllStructSetData($tSize, "Y", $ResH) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _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) EndFunc ;==>SetBitmap Func _My_Gui() Local $yGUI = GUICreate("", 1, 1, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) _GDIPlus_Startup() Local $yImage = _GDIPlus_ImageLoadFromFile($Resim) SetBitMap($yGUI, $yImage, 255) Local $Gui_X = @DesktopWidth - ($ResW + 5) Local $Gui_Y = @DesktopHeight - ($ResH + 5) Local $Shell_Pos = WinGetHandle("[CLASS:Shell_TrayWnd]") ;CLASS:Progman If $Shell_Pos <> "" Then $Shell_Pos = WinGetPos($Shell_Pos) If UBound($Shell_Pos) = 4 Then If $Shell_Pos[1] < 1 Then If $Shell_Pos[0] > 0 Then $Gui_X = @DesktopWidth - ($Shell_Pos[2] + ($ResW + 5)) Else If $Shell_Pos[0] < 1 Then $Gui_Y = @DesktopHeight - ($Shell_Pos[3] + ($ResH + 5)) EndIf EndIf EndIf WinMove($yGUI, "", $Gui_X, $Gui_Y, $ResW, $ResH) GUISetState(@SW_SHOW) EndFunc ;==>_My_Gui Func __TempFile($s_FileExtension = ".tmp", $s_DirectoryName = @TempDir, $s_FilePrefix = "~", $i_RandomLength = 7) ; Check parameters If IsKeyword($s_FilePrefix) Then $s_FilePrefix = "~" If IsKeyword($s_FileExtension) Then $s_FileExtension = ".tmp" If IsKeyword($i_RandomLength) Then $i_RandomLength = 7 If Not FileExists($s_DirectoryName) Then $s_DirectoryName = @TempDir ; First reset to default temp dir If Not FileExists($s_DirectoryName) Then $s_DirectoryName = @ScriptDir ; Still wrong then set to Scriptdir ; add trailing \ for directory name If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" ; Local $s_TempName Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return $s_TempName EndFunc ;==>__TempFile [/codebox] [/quote] Peki bir soruda ben sormak istiyorum. Resim popup olarak çıkıyor. ama birden kayboluyor. Bu süreyi nasıl ayarlarız? Yani yukarı çıkarken ve aşağıya inerken kaybolma sürelerini nasıl ayarlarız.. Asansör gibi mesela. [img]http://www.tnctr.com//public/style_emoticons/default/smile.png[/img] tşkler şimdiden Edited September 4, 2012 by promes Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted September 5, 2012 Share Posted September 5, 2012 Sleep(5000) kod satırını kafa göre ms cinsinden değiştir. Misal daha geç olsun Sleep(7000) Quote Link to comment Share on other sites More sharing options...
promes Posted September 5, 2012 Share Posted September 5, 2012 [quote name='SimpsoN_Bart' timestamp='1346859215' post='1237826'] Sleep(5000) kod satırını kafa göre ms cinsinden değiştir. [img]http://www.tnctr.com//public/style_emoticons/default/wink.png[/img] Misal daha geç olsun Sleep(7000) [/quote] Cevap verdiğin için tşk ederim. AMA! benim yapmak istediğim resmin geç kaybolması değil. Yukarıdaki kodlarla oluşturduğumuzda resim birden ekrena geliyor. ve diyelim 5 saniye sonra kayboluyor aniden. Benim istediğim resim aşağıdan çıksın ve kaybolurken aşağıya doğru inerek kaybolsun. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted September 5, 2012 Share Posted September 5, 2012 [url="http://www.tnctr.com/topic/207463-trayicon-sorunu/page__gopid__1237939#entry1237939"]http://www.tnctr.com/topic/207463-trayicon-sorunu/page__gopid__1237939#entry1237939[/url] bakınız Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.