Re: Could you please help me figure out what i'm doing wrong?

"damien c. sadler" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
you can't set a hotkey to a function that contains parameters.

out of interest, is that philip bennefall's menu code?

regards,

damien




----- Original Message -----
From: "Jodie and Tiger" <[email protected]>
To: <[email protected]>
Sent: Wednesday, October 11, 2006 6:08 PM
Subject: [AutoIt] Could you please help me figure out what i'm doing wrong?


> Hi. I'm trying to make a less complicated library than I have using
hotkeyset, but I can't seem to get it to work. From this code, could someone
help me figure out what I'm missing? Thanks in advance.
>
> #include-once
> HotKeySet("{up}", "create_audio_menu")
> HotKeySet("{down}", "create_audio_menu")
> HotKeySet("{enter}", "create_audio_menu")
> Func create_audio_menu($description,$options)
> If $description = "" Then return 0
> If $options = "" Then return 0
> $selection = 0
> $items = StringSplit($options,",")
> If @Error Then return 0
> $menu_length = $items[0]
> $menu = $device.OpenSound($description & "",true)
> $menu.Play()
> While 1
> $active_window = WinGetProcess("")
> If $active_window = @AutoItPid Then
> Else
> Sleep(10)
> ContinueLoop
> EndIf
> If $selection > 0 Then
> $menu = ""
> return $selection
> EndIf
> If $selection < 1 Then
> $selection = $menu_length
> EndIf
> $file_to_open = $items[$selection]
> $menu = $device.OpenSound($file_to_open & "",true)
> $menu.Play()
> $limit = $menu_length+1
> If $selection = $limit Then
> $selection = 1
> EndIf
> $file_to_open = $items[$selection]
> $menu = $device.OpenSound($file_to_open & "",true)
> $menu.Play()
> WEnd
> EndFunc
>
> Hugs from Jodie and kisses from Tiger.
> :)
> "Belief is the cradle of myth."
> Stephen King
>
>
> ----------------------------------------
> I am using the free version of SPAMfighter for private users.
> It has removed 2521 spam emails to date.
> Paying users do not have this message in their emails.
> Get the free SPAMfighter here: http://www.spamfighter.com/len
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AutoItList/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/AutoItList/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.