Jump to content

Traytip Te Yazı Yerine Logo (Reklam) Çıkartma


WolfmanTR_
 Share

Recommended Posts

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..!
Link to comment
Share on other sites

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]

Link to comment
Share on other sites

[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...

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

  • 4 ay sonra...

[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 by promes
Link to comment
Share on other sites

[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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...