Jump to content

İniden Veri Okuma


korasoglu
 Share

Recommended Posts

Arkadaşlar şu örnekteki resmi ve mp3 iniden nasıl alabiliriz.

Şu satırı = SoundPlay(".\Kurulum başladı.mp3", 0)

Birde Şu Satırı = Local $yImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Logo.png")

 

 

[spoiler]#NoTrayIcon
#include
#include
#include
SoundPlay(".\Kurulum başladı.mp3", 0)
;----- Variables -----
Global $ResW, $ResH
Myname()
Sleep(3000)
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 Myname()

Local $yGUI = GUICreate("", 1, 1, 0,0, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
_GDIPlus_Startup()
Local $yImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Logo.png")
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 ;==>Myname[/spoiler]

 

Mesela ini şöyle olsa

[Olustur]

resim=8.png

muzik=9.mp3

Link to comment
Share on other sites

  • Editor

Local $mp3 = IniRead(@ScriptDir & "\a.ini", "Olustur", "muzik", "NotFound")
Local $resim = IniRead(@ScriptDir & "\a.ini","Olustur","resim", "NotFound")

MsgBox(0,"a",$mp3 &@CRLF& $resim)

Link to comment
Share on other sites

Sevgili Pairs Ben uygulayamadım olayı anladın zaten splashtaki resmi ve muziği iniden çekmek istiyorum hepsi bu ama yapamadım.

Edit : Hepsi şu imiş teşekkür ederim

Local $yImage = _GDIPlus_ImageLoadFromFile($resim)

Edited by korasoglu
Link to comment
Share on other sites

özür diliyorum haklısınız autoit komutlarıyla
sildiğimizde boş kalmıyor nedense aklımda öyle kalmış sanıyorum ben şununlakarıştırdım
manuel olarak sildiğimizde
boşluklar oluşuyordu veri eklediğimizde ise boşluklara değil en sona ekliyordu ben onunla
karıştırdım kusura bakmayın lütfen
herkese kolay gelsin

Link to comment
Share on other sites

  • 1 ay sonra...
  • Editor

Arkadaşlar uygulamayı Sleeple değil Enter veya Esc ile nasıl kapatabiliriz.

Proje açıkken esc yada enter a basınca kapatmasınımı diyorsun hocam.

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