Jump to content

question for function on right click


Recommended Posts

http://www.autoitscript.com/forum/index.php?showtopic=64738

ok so i was told to check out the above link above but i still have no idea which is the "right click function code" and what i do to enable it.

basically i want this function to happen when i hit the "right click button" on my mouse. can someone help please

Func hi()

Sleep(50)

Send("{ENTER}")

Send(" hi hi hi")

Send("{ENTER}")

Sleep(50)

Endfunc

Link to comment
Share on other sites

  • Developers

Be patient pls. no bumps within 24 hours.

Why didn't you stick with that one topic to make it clear what you are doing?

What is it you do not understand?

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

Link to comment
Share on other sites

Hi,

Just add the contents of the zip file in the link to C:\Program Files\AutoIt3\Include

then use this :-

#include <MouseOnEvent.au3>

;Disable Secondary mouse button *up*, and call our function when mouse button *up* event is recieved
_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "MouseSecondaryUp_Event")
Sleep(5000)
_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) ;Enable mouse button back.


Func MouseSecondaryUp_Event()

Sleep(50)
Send("{ENTER}")
Send(" hi hi hi")
Send("{ENTER}")
Sleep(50)

EndFunc
Link to comment
Share on other sites

  • Moderators

tuanoooo,

Short answer: Yes.

Longer answer: As you obviously have no idea about coding in AutoIt (and that is not a problem because we all started at that point! :P ) you need to get a grip of the basics.

Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading.

I know you want to start coding NOW, but a little study will save you a lot of trouble later on, believe me. :blink:

M23

P.S. If you look at the Help file page for #include it tells you how to get a personal include folder so you do not have to copy UDFs into the main AutoIt include folder. That way they do not get overwritten each time you upgrade. ;)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...