Automate Go To Environment Variables Windows 7

Asked by Learner

I want to automate to "Go to Environment variables " in windows 7 . Process is clicking
Windows Symbol at down -> Right Click on Computer button/text -> Properties -> Advanced System Settings -> Environment Variables .

Problem is its detecting Computer text/button and rightclicking on exact coordinates but the popup (on clicking windows key popup) is gone by that time , don't know the reason . So i'm not able to proceed . Any ideas

Code is as follows

click (<windows button at bottom>)
wait(0.5)
rightClick(<computer text >)

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
obiwan-92 (obiwan-92) said :
#1

Hello,

What do you try to do in the Windows variables window ?

If you want to check a variable :
import os
os.getenv("windir")

If you want to add some variables to Windows :
os.putenv("HOME")

Hope it's help.

Regards.

Revision history for this message
Learner (gopikrish2000) said :
#2

I frequently add/change environment variables , so i want to see and change/copy easily . Also if this issue is solved i will be able to click on other Win Popup items like Control Panel,Music ,Downloads . Any idea why the windows popup is getting dismissed after click of Windows Button at bottom??

Revision history for this message
Eugene S (shragovich) said :
#3

Hi,

Would you be able to provide some screenshots to demontrste your issue?

Cheers,
Eugene

Revision history for this message
Learner (gopikrish2000) said :
#4

Hi Eugene,

Thanks for your reply. Are you able to right Click on "Computer" Text in the Windows popup ( either Windows key or Click windows icon bottom popup ) and click on properties ???

Its just right clicking on window below the popup on exact coordinates ( but popup is already closed ). So not attaching any screenshot .

I already gave the code

click (<windows button at bottom>)
wait(0.5)
rightClick(<computer>)
wait(0.5)
click(<properties>)

Revision history for this message
Learner (gopikrish2000) said :
#5

Any body tried above , to rightClick on "computer popup item" and worked for them ??

Revision history for this message
RaiMan (raimund-hocke) said :
#6

yes we can ;-)

(tested on Windows XP with SikuliX 1.0.1)

*** preps in IDE
- new script (save it)
- start = <start button image>
- computer =
- now go outside IDE and click start button manually and use shift-ctrl-2 to start the capture and capture your computer image
- back in IDE you now have
computer = <image of computer>
- props =
- now go outside IDE and click start button and right click on computermanually and use shift-ctrl-2 to start the capture and capture the respective menu item
- back in IDE you now have
props = <image of menu item>

.. and now:
click(start)
wait(0.5)
rightClick(computer)
wait(0.5)
click(props)

… and here you are ;-)

Revision history for this message
RaiMan (raimund-hocke) said :
#7

I still do not understand, why you do this with Sikuli.

The Windows Powershell has everything you need.

Can you help with this problem?

Provide an answer of your own, or ask Learner for more information if necessary.

To post a message you must log in.