Sign in to follow this  
Followers 0
00pontiac

trying to use IsPressed_UDF.au3 with a function key

10 posts in this topic

I've written a script that sends a '1' then '2' then '3' then '4' then 'Esc' each time a key is triggered

my script is working with the key combination of Ctrl 8 to trigger it

I want to use the function key "F9" instead but I don't get what I'm doing wrong

#include<IsPressed_UDF.au3>

Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 50)

$x = 0

While 1
;If _IsPressed("011") And _IsPressed("038") Then ; <---- working
If _IsFuncKeyPressed() Then ; <---- blank right now i know. have tried every combination I can think of
If $x = 4 Then
Send("{Esc}")
$x = 0
Else
$x = $x + 1
Send ( $x )
EndIf
EndIf
Wend

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Edit: never mind, I figured this part out, my logitech mouse was sending the control, not my script, but still need a little help with the function key :(

after posting I ran into the control key getting stuck down. first I took the Ctrl key completely out, is not needed. was still getting stuck so I searched and found this:

ControlSend("", "", "", "text", 0)

it doesn't work perfectly tho... works sometimes, not every time...

Edited by 00pontiac

Share this post


Link to post
Share on other sites

another script never getting finished... :ermm:

Share this post


Link to post
Share on other sites

another script never getting finished... :ermm:

Excuse me? :wacko: What are you talking about?

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

pretty easy to understand really.

Share this post


Link to post
Share on other sites

I don't get it either. Are you saying that you are waiting on help, lost interest, don't need it anymore, Mayans ate your keyboard or what?

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

I'm saying that I've given up any hope of getting any help here, I'm a "noob" experienced users have better things to do. that attitude is abundantly clear from reading this help section.

sorry, just discouraged... warn me ban me berate me whatever... just lost interest i guess.

Share this post


Link to post
Share on other sites

00pontiac,

It is unfortunate that you feel that way. My impression is that your previous threads were responded to adequately. This is a volunteer resource and as such you may have some delay in getting an answer. Have some patience and use the lag time for other tasks.

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

00pontiac,

I've given up any hope of getting any help here,, I'm a "noob" experienced users have better things to do. that attitude is abundantly clear from reading this help section

I get really quite annoyed whenever I read this sort of whining excuse. I (and plenty of other members) help anyone we can, regardless of their experience level, but we cannot be everywhere - nor do we have the time or interest to read every single thread. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You have to wait until someone who knows something about your particular problem, and is willing to help, comes online.

In this case, why have you not posted in the IsPressed UDF thread itself? Most of us use the built-in _IsPressed command - do you expect us to install and play with a new UDF just to help you?

And why on earth should you be banned? Berated like this for acting as you have done, certainly, but you are quite at liberty to state your opinion - just do not expect us to agree. ;)

M23

Edit: Changed wording to be less "me"-centred - because I know lots of others help out too. :)

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

This works perfectly for me using the native _IsPressed command - does it for you? :)

#include <Misc.au3>

HotKeySet("{ESC}", "On_Exit")

Local $hDLL = DllOpen("user32.dll")

While 1

    If _IsPressed("78", $hDLL) = 1 Then

        For $i = 1 To 3
            Send($i)
        Next
        Send("{ESC}")

        While _IsPressed("78", $hDLL)
            Sleep(10)
        WEnd

    EndIf

    Sleep(10)

WEnd

Func On_Exit()
    ConsoleWrite("ESC pressed!" & @CRLF)
    DllClose($hDLL)
    Exit
EndFunc

M23

Edited by Melba23
Typo

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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