Jump to content
Sign in to follow this  
cerix

Sendkeys problem

Recommended Posts

cerix

i have a problem...

Send("{ALT}")

this code just one click

when i want always click i must this code

While 1

sleep(30)

Send("{ALT}")

WEnd

how can i tell? so....

always finger on Alt

not press one click

always press

so one finger always on ALT

Could i tell ? :D

Share this post


Link to post
Share on other sites
cerix

HotKeySet("{F2}", "start")

HotKeySet("{F3}", "stop")

HotKeySet("{F6}", "escape")

main()

Func main()

While 1

WEnd

EndFunc;==>main

Func start()

Send("{ALT}" [, 0])

WEnd

EndFunc;==>start

Func stop()

main()

EndFunc;==>stop

Func escape()

??????????

Exit

EndFunc;==>escape

Share this post


Link to post
Share on other sites
Melba23

cerix,

There must be literally hundreds of snippets like this on the forums - try using search next time. ;-)

HotKeySet("{F2}", "start")
HotKeySet("{F3}", "stop")
HotKeySet("{F6}", "escape")

Global $fRun = False

main()

Func main()
    While 1
        Sleep(10); Important or you can get 100% CPU usage <<<<<<<<<<<<<<
    WEnd
EndFunc  ;==>main

Func start()
    $fRun = True
    While $fRun
        Send("{ALT}"[, 0])
    WEnd
EndFunc  ;==>start

Func stop()
    $fRun = False
EndFunc  ;==>stop

Func escape()
    Exit
EndFunc  ;==>escape

M23


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
Melba23

cerix,

Read the Help file for Send:

{ALTDOWN} - Holds the ALT key down until {ALTUP} is sent

But be careful because the key can "stick" down. Search the forum for how to cure that (start with the FAQ sticky at the top :-))

M23


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
cerix

cerix,

There must be literally hundreds of snippets like this on the forums - try using search next time. ;-)

HotKeySet("{F2}", "start")
HotKeySet("{F3}", "stop")
HotKeySet("{F6}", "escape")

Global $fRun = False

main()

Func main()
    While 1
        Sleep(10); Important or you can get 100% CPU usage <<<<<<<<<<<<<<
    WEnd
EndFunc ;==>main

Func start()
    $fRun = True
    While $fRun
        Send("{ALT}"[, 0])
    WEnd
EndFunc ;==>start

Func stop()
    $fRun = False
EndFunc ;==>stop

Func escape()
    Exit
EndFunc ;==>escape

M23

but this code not working???

problem here Send("{ALT}"[, 0])

Share this post


Link to post
Share on other sites
Jos

but this code not working???

problem here Send("{ALT}"[, 0])

correct. You are not supposed to copy the syntax from the helpfile and expect it to work.

[,0] means that this is an optional parameter.

Just use Send("{ALT}").

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
cerix

HotKeySet("{F2}", "start")

HotKeySet("{F3}", "stop")

HotKeySet("{F6}", "escape")

Global $fRun = False

main()

Func main()

While 1

Sleep(10)

WEnd

EndFunc ;==>main

Func start()

$fRun = True

While $fRun

Send("{ALT}", 0)

WEnd

EndFunc ;==>start

Func stop()

$fRun = False

EndFunc ;==>stop

Func escape()

Exit

EndFunc ;==>escape

This code pressing as ALT ALT ALT ALT ALT .................................

But

i want

JUST onetimes press but Dont pull over ALT buttons

Share this post


Link to post
Share on other sites
Jos

There is no need to create a new topic for each question about the same script everytime.

Try using {ALTDOWN}

Jos

PS: All 3 threads merged.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
martin

HotKeySet("{F2}", "start")

HotKeySet("{F3}", "stop")

HotKeySet("{F6}", "escape")

Global $fRun = False

main()

Func main()

While 1

Sleep(10)

WEnd

EndFunc ;==>main

Func start()

$fRun = True

While $fRun

Send("{ALT}", 0)

WEnd

EndFunc ;==>start

Func stop()

$fRun = False

EndFunc ;==>stop

Func escape()

Exit

EndFunc ;==>escape

This code pressing as ALT ALT ALT ALT ALT .................................

But

i want

JUST onetimes press but Dont pull over ALT buttons

You don't need to start a new thread for a subject you already have a thread for, just post in the first thread.

You do need to learn to read the help. If you look in the help for "Send" you will see a table for the send commands and the resulting key press. What you want is in that list!


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Melba23

cerix,

I already gave you that advice (and some more!) in one of your earlier posts. Please read the responses before posting again. ;-)

M23


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  

×