Sign in to follow this  
Followers 0
Rad

A few small questions

6 posts in this topic

1: How do I remove the little tab on the taskbar while keeping my WS_POPUP attribute on my window? (My window is supposed to stay open for long periods of time and I hate excess tabs)

2: How do I loop a sound (Possibly with a small delay) without causing the script to wait too (If I were to use Sleep())

3: What are some of the sound types Au3 supports? It says (typically a WAV or MP3), but .mid worked on my tic tac toe game (lol tic tac toe with background music!). What are there extensions though, because you can select different sounds for use with my program but I dont want to allow it to select .exe's for example

Ty for any help

Share this post


Link to post
Share on other sites



What tab on the task bar? Are you referring to the extended style:

$WS_EX_TOOLWINDOW 0x00000080 Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by typing ALT+SPACE.

This type of info can be found in the help file under GUI Control Styles.

2nd question: A seperate script/exe or AdlibEnable.

3rd question is for the masses... I don't play with those types of things to give an honest answer.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Attached my taskbar highlighting the tab... lol making an alarm clock right now I dont want the tab to show because it always on top and has system tray menu and the tab again, isnt needed

The Adlibenable looks pretty useful... although im not sure what the name is supposed to be from If it works how im thinking it should work for alot more than just that :nuke:

And for the looping sound, I figured out that if I use one of my songs (.mp3) it loops automatically, but if I use a (.wav) it starts a new one each time (Having the PlaySound() in my While 1). Just tried midi too... that didnt go well lol, for some reason it freezes for like 10 seconds when it loads (Midi isnt a music/sound file its a list of instruments and notes that plays, so its probrably loading those)... Anyway, I think I'll just make the sounds .mp3 only as that seems the easiest

Thx once again smoke :P

Share this post


Link to post
Share on other sites

GUICreate("Clock", 200, 200, -1, -1, $WS_POPUP, BitOr($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))

$WS_POPUP is the style you want to use.

$WS_EX_TOPMOST makes the window topmost.

$WS_EX_TOOLWINDOW makes it not in the taskbar.


[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Share this post


Link to post
Share on other sites

Awesome it works perfect thanks!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

2: How do I loop a sound (Possibly with a small delay) without causing the script to wait too (If I were to use Sleep())

Download http://www.autoitscript.com/fileman/users/Helge/udfs/Sound.au3 UDFs and then try this script :
#include "Sound.au3"

SoundPlay(@WindowsDir & "\media\tada.wav")

While 1
    Sleep(10)
    
    $aInfo = _SoundGetInfo()
    If $aInfo[1] = "stopped" Then
        _SoundClose()
        AdlibEnable("loopsound", 1000)
    EndIf
WEnd

Func loopsound()
    SoundPlay(@WindowsDir & "\media\tada.wav")
    AdlibDisable()
EndFunc

The _SoundClose is just a method to make the above expression false so that

the loop-process doesn't start the next time. I hope it works for your script.

My fileman and UDFs is soon to go thru a very needed update :P

Edited by Helge

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0