Re: [Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-15 Thread RaiMan
Question #681984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681984

RaiMan proposed the following answer:
ok, you can do that in a script:

try:
  import org.sikuli.natives.WinUtil as Windows
  path = Windows.getEnv("PATH") # get current path
  # manipulate the path string
  newPath = Windows.setEnv("PATH", changedPath) # change it
  if (newPathh == changedPath):
 pass #worked
except:
  pass # did not work

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-15 Thread Asheru
Question #681984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681984

Asheru posted a new comment:
Sorry, my bad. I was not clear enough.

To be more specific, the problem is:

We are testing an app(MyTestApp let's call it) and we have a large suite
of tests built with sikulix+python. This are executed on two virtual
machines from TFS.

'MyTestApp' uses a module called 'pdftk' when you open a pdf doc from
this app. The app is adding at installation to windows Path this :
C:\Program Files (x86)\PDFtk\bin, in order for this module to work.

On the VM when sikuli script is trying to open a PDF file the path to PDFTK is 
not found anymore. 
It works locally, no problem. 

I know it should not have any impact no matter how many things you have
in windows PATH, but could it possibly be something from sikuli like
changing something in path variable or something similar that could
affect other paths already present there?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-12 Thread Asheru
Question #681984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681984

Asheru posted a new comment:
Ok I see.

The problem we are having is that we have an app that we are testing a
desktop app with sikuli, TestApp let's say.

One of the modules that this app uses a module called 'pdftk' and this
relies on the presence of it's path in the windows path. While executing
the test in a VM at the point where this module is needed it says that
the path to the 'pdftk' is not found.

--the lib path is added to the end of the Windows path--

Then this could explain why it's not working and the path it's not
found. It's because before starting the script the lib path is added to
windows path.

Could we somehow simply avoid this behaviour in our script easly? Or
it's mandatory for sikulix to run like that

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-12 Thread RaiMan
Question #681984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681984

RaiMan proposed the following answer:
--- But while executing a normal script it does not change anything related to 
that, right?
not while running, but before starting the script run, the lib path is added to 
the end of the Windows path.
But this does not clash with any wrapper actions.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-12 Thread Asheru
Question #681984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681984

Asheru posted a new comment:
Ok thanks.
But while executing a normal script it does not change anything related to 
that, right?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-12 Thread RaiMan
Question #681984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681984

Status: Open => Answered

RaiMan proposed the following answer:
Not a feature.

You have to do that in some wrapper (command script, ...).

Or in your SikuliX script/program using the JNA features (JNA 5.3.1 is
bundled with SukuliX already).

An example for manipulating the Windows path you can find in the sources:
class: org.sikuli.script.support.RunTime::addToWindowsSystemPath

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #681984]: Could SIkuli change some environment variables at runtine?

2019-07-12 Thread Asheru
New question #681984 on Sikuli:
https://answers.launchpad.net/sikuli/+question/681984

Hello,

I'm wondering if Sikuli could possibly change some system environment variables 
at runtime, like windows path for example or others?

While running some tests we are missing some dependencies needed by our app 
that is tested. Those are relying on some system variables and we want to 
eliminate this possibility.

Thanks

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp