Jump to content

Questions about GUI interface


LostZXC
 Share

Recommended Posts

Dear Autoit Community,

I have looked through the forums a bit, and read through the help topics that come with autoit. I would like to know to get the id of an item that is clicked on. (Be it an icon , tab, file name in a list, ect). I am trying to muddle my way through the learning process, my current project is to create a file paired with a file or folder, and bring it up whenever the file or folder is clicked. I just finished doing the same using window captions as the trigger.

In a similar vein I am trying to make a combo box that I can populate from an array, and select an item in by double clicking, and get a context menu by right clicking. All very mundane, but useful.

What I really am working toward is to interface with graphics on a website that uses java script to automate the login process. I need more experience before I can make a decent code to do that.

1) if I click on an icon it becomes highlighted. while it is highlighted it has focus? How do I interface the currently selected icon.

2) if different from the procedure used in "1)" how would I detect a double click or right click.

Please note that I found a double click\ right click example in the forums, but I didn't get it to work for me.

It would be grand if someone could point me it the right direction.

Link to comment
Share on other sites

Dear Autoit Community,

I have looked through the forums a bit, and read through the help topics that come with autoit. I would like to know to get the id of an item that is clicked on. (Be it an icon , tab, file name in a list, ect). I am trying to muddle my way through the learning process, my current project is to create a file paired with a file or folder, and bring it up whenever the file or folder is clicked. I just finished doing the same using window captions as the trigger.

In a similar vein I am trying to make a combo box that I can populate from an array, and select an item in by double clicking, and get a context menu by right clicking. All very mundane, but useful.

What I really am working toward is to interface with graphics on a website that uses java script to automate the login process. I need more experience before I can make a decent code to do that.

1) if I click on an icon it becomes highlighted. while it is highlighted it has focus? How do I interface the currently selected icon.

2) if different from the procedure used in "1)" how would I detect a double click or right click.

Please note that I found a double click\ right click example in the forums, but I didn't get it to work for me.

It would be grand if someone could point me it the right direction.

First things first...

Are you asking about an AutoIt GUI of your own, or a GUI from another app, or a web browser? If more than one of those is involved, please break it out as separate topics for each, as this topic sounds hopelessly muddled with multiple issues.

You get picked on for duplicate posting in this forum, but asking many varied questions on different topics in one post also makes issue resolution difficult to track and search on.

Thanks for clarifying.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

------------ clarification-------------------------------------------------------------------

If I shift the focus to an icon on the desktop, then I can manipulate it; left click to execute ,right clicking will present a list of options (cut, paste, copy,..... ext)

Each of these actions will be carried out on the file the icon represents.

I have made a simple script that opens or (if the file does not exist) creates and then opens a file when a key is pressed, with the file to be opened dependent on the caption of the active window's caption. If I had a way to check the item with focus I could use it instead.

How do I watch the item that has focus, and how do I get the handle for it?

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++

So Sorry, I had the wrong vocabulary, I was looking in the wrong spots.

_GUICtrlListView_GetHotItem is a good start

Edited by LostZXC
Link to comment
Share on other sites

------------ clarification-------------------------------------------------------------------

If I shift the focus to an icon on the desktop, then I can manipulate it; left click to execute ,right clicking will present a list of options (cut, paste, copy,..... ext)

Each of these actions will be carried out on the file the icon represents.

I have made a simple script that opens or (if the file does not exist) creates and then opens a file when a key is pressed, with the file to be opened dependent on the caption of the active window's caption. If I had a way to check the item with focus I could use it instead.

How do I watch the item that has focus, and how do I get the handle for it?

The desktop is just another window [Class:Progman; Title:Program Manager] with a SysListView32 control holding the icons. You should be able to list the items in the SysListView32 control, and query which is selected/has focus.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...