Haseeb Posted May 30, 2008 Share Posted May 30, 2008 (edited) hi, anyone will tell me how can i add sound and icon in this. $M1 = "WARNING !!!" $MESSAGE = "Adult Content Detected." & @CRLF & @CRLF & "Open Something Else..." & @CRLF & @CRLF & "You FOOL !!!" & @CRLF & @CRLF & "Press OK To Continue..." Func ColorTextBox($title,$text,$color) Local $L_TEXT = StringLen($text) Local $ROW = Int(Number($L_TEXT) / 45) + 1 Local $GUI = GUICreate($title,200,40*Number($ROW) + 30,-1,-1) Local $FIELD = GUICtrlCreateLabel($text,5,5,190,42*Number($ROW),0x01) Local $OK = GUICtrlCreateButton("OK",130,40*Number($ROW) + 0,55,25) GUICtrlSetColor ($FIELD,$color) GUISetState(@SW_SHOW,$GUI) While 1 Local $MSG = GUIGetMsg() If $MSG = $OK Then GUIDelete($GUI) ExitLoop EndIf WEnd EndFunc if WinExists("") Then ColorTextBox($M1, $MESSAGE,0xFF0000) EndIf any suggestions or comments are welcomed! thanks in advance for the help. Edited May 30, 2008 by GsmExpert Link to comment Share on other sites More sharing options...
sandin Posted May 30, 2008 Share Posted May 30, 2008 couldn't find exact icon, sry $M1 = "WARNING !!!" $MESSAGE = "Adult Content Detected." & @CRLF & @CRLF & "Open Something Else..." & @CRLF & @CRLF & "You FOOL !!!" & @CRLF & @CRLF & "Press OK To Continue..." Func ColorTextBox($title,$text,$color) Local $L_TEXT = StringLen($text) Local $ROW = Int(Number($L_TEXT) / 45) + 1 Local $GUI = GUICreate($title,200,40*Number($ROW) + 30,-1,-1) Local $icon = GUICtrlCreateIcon("shell32.dll", "338", 20, 115) Local $FIELD = GUICtrlCreateLabel($text,5,5,190,30*Number($ROW),0x01) Local $OK = GUICtrlCreateButton("OK",130,40*Number($ROW) + 0,55,25) GUICtrlSetColor ($FIELD,$color) GUISetState(@SW_SHOW,$GUI) SoundPlay(@WindowsDir & "\media\Windows XP Critical Stop.wav",1) While 1 $MSG = GUIGetMsg() If $MSG = $OK Then GUIDelete($GUI) ExitLoop EndIf WEnd EndFunc if WinExists("") Then ColorTextBox($M1, $MESSAGE,0xFF0000) EndIf Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
Haseeb Posted May 30, 2008 Author Share Posted May 30, 2008 ok, thanks! will you please tell me how can i set the sound volume to maximum of this sound play. using SoundSetWaveVolume(100) i want that it should play the sound with maximum available sound percentage. can you tell me how can i do it ? thanks. Link to comment Share on other sites More sharing options...
Haseeb Posted May 31, 2008 Author Share Posted May 31, 2008 ^^ Dump ^^ Link to comment Share on other sites More sharing options...
Andreik Posted May 31, 2008 Share Posted May 31, 2008 (edited) $M1 = "WARNING !!!" $MESSAGE = "Adult Content Detected." & @CRLF & @CRLF & "Open Something Else..." & @CRLF & @CRLF & "You FOOL !!!" & @CRLF & @CRLF & "Press OK To Continue..." Func ColorTextBox($title,$text,$color) Local $L_TEXT = StringLen($text) Local $ROW = Int(Number($L_TEXT) / 45) + 1 Local $GUI = GUICreate($title,200,40*Number($ROW) + 60,-1,-1) Local $icon = GUICtrlCreateIcon("user32.dll",-4, 20, 40*Number($ROW)) Local $FIELD = GUICtrlCreateLabel($text,5,5,190,30*Number($ROW),0x01) Local $OK = GUICtrlCreateButton("OK",130,40*Number($ROW) + 10,55,25) GUICtrlSetColor ($FIELD,$color) GUISetState(@SW_SHOW,$GUI) SoundPlay(@WindowsDir & "\media\Windows XP Critical Stop.wav",1) While 1 $MSG = GUIGetMsg() If $MSG = $OK Then GUIDelete($GUI) ExitLoop EndIf WEnd EndFunc if WinExists("") Then ColorTextBox($M1, $MESSAGE,0xFF0000) EndIf Edited May 31, 2008 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Jos07 Posted May 31, 2008 Share Posted May 31, 2008 (edited) it just changed the icon but have not added sound increasing code like he asked. Edited May 31, 2008 by Jos07 Always Keep Your Sig Small... Like me :D Link to comment Share on other sites More sharing options...
Andreik Posted May 31, 2008 Share Posted May 31, 2008 #include <Audio.au3> $M1 = "WARNING !!!" $MESSAGE = "Adult Content Detected." & @CRLF & @CRLF & "Open Something Else..." & @CRLF & @CRLF & "You FOOL !!!" & @CRLF & @CRLF & "Press OK To Continue..." Func ColorTextBox($title,$text,$color) Local $L_TEXT = StringLen($text) Local $ROW = Int(Number($L_TEXT) / 45) + 1 Local $GUI = GUICreate($title,200,40*Number($ROW) + 60,-1,-1) Local $icon = GUICtrlCreateIcon("user32.dll",-4, 20, 40*Number($ROW)) Local $FIELD = GUICtrlCreateLabel($text,5,5,190,30*Number($ROW),0x01) Local $OK = GUICtrlCreateButton("OK",130,40*Number($ROW) + 10,55,25) GUICtrlSetColor ($FIELD,$color) GUISetState(@SW_SHOW,$GUI) _SoundSetMasterVolume(100) SoundSetWaveVolume(100) SoundPlay(@WindowsDir & "\media\Windows XP Critical Stop.wav",1) While 1 $MSG = GUIGetMsg() If $MSG = $OK Then GUIDelete($GUI) ExitLoop EndIf WEnd EndFunc if WinExists("") Then ColorTextBox($M1, $MESSAGE,0xFF0000) EndIf Search Audio.au3 on forum. Designed by Gary Frost, RazerM, Xenobiologist, and a little help from Volly When the words fail... music speaks. 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