Sign in to follow this  
Followers 0
Guest Fate

Help the noob out please!

9 posts in this topic

I have a program that will only appear in system tray after it is run'd. And there is a "Status" button, which can open a status window, after I right click the icon of this program in system tray and left click that left button. Right now, I am trying to write a script that will basically Run() the program, then it should send a command to open that status program. Can anyone tell me how to do it please? Please help the noob out~~

Thanks :)

Share this post


Link to post
Share on other sites



what is the program. telling us what the program is, can help out alot. :)


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

With BitDefender I had a similar problem.

I was thinking "If you minimize a program to the system tray, the only thing the program does is hide the window."

So what I did is save the title of BitDefender and use this:

WinSetState("BitDefender Professional v7.2", "", @SW_SHOW)

You can do the same with the window you're talking about.

Share this post


Link to post
Share on other sites

Thanks for the helps. I am really appreciated.

WinSetState did show up the hidden window, but not the status window i want.

Maybe I didn't explain quite clear. I will use autoit as an example, so everyone is familiar with it:

When I run a script, the autoit icon will show up in the system tray. And there are two ways that I can pause the script: either using the script itself or manually control, such as right click the icon and then left click the pause button. If today I can't use sleep() to pause the script or I can't do it manually. Is there any possible way that I can select that "pause" button by using my script? similiar to my previous question, how can i use my script to select that "status" button?

Thank you so much :)

Share this post


Link to post
Share on other sites

I know it can be done... you have to use mouseclick() and coordinates. Use AutoIt's window spy to get the coordinates. You can click your left and right mouse buttons on anything you can see on the screen.

If you are on windows XP then you will have to make sure it isnt in the unused icon area or you will have to add an extra step to get to it. Or you could just set it to always be shown whether it has been used recently or not.

Check the help file and Window Spy they should pretty much explain everything. I havent gotten into mouse clicks so I cant help you much further.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Accessing anything in the system tray is a royal pain in the you know what. You can't use the mouse clicks because the icon may not always be in the same place.

The only way that I could do it for sure is use a program called ResHacker.exe and modify the icon that the program uses in the system tray and change a couple of pixles to say Bright Yellow and then do a pixel search and then funnel the returned coord's into a mouse click.

copmpicated yes, but it's the only way I could do it for my purposes.


Share this post


Link to post
Share on other sites

There are certainly many more than one ways to skin this cat so if you need any more help just bring us some code so we can debug it for you.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Thanks alot for the helps!!! I believe those methods can solve my problem surely. :)

But why if I am currently running a program that will take full-screen, I can't use mouse to click the icon or anything in system tray or anywhere on my desktop. (Also, I can't exit or alt-tab out that program, in order to accomplish the mouseclick().) Is there still a possible way to solve this situation? :)

Share this post


Link to post
Share on other sites

You can only click with AutoIt what you can click when you are just normally using your computer. With clicking, unless it is a control, you cant click unless you can see it. So unless that full screen program allows you to see the taskbar then you will have to minimize or resize it before running your script.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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