Re: [Sikuli-driver] [Question #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 RaiMan proposed the following answer: clapping hands ;-) I would not have it done better. ... you might even put the wanted exe-filename as a parameter to the Popen, when saying: ("python", "path_to_GetSetupBuildNumber.py", "wanted-filename"), ... and in the GetSetupBuildNumber.py get the filename from sys.argv[1] -- 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 #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 Asheru posted a new comment: **theproc = subprocess.Popen(path_to_GetSetupBuildNumber.py, shell = True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT) -- 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 #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 Asheru posted a new comment: I found a solution for this. Not the best but simple and quick (works for me). So I have a script named "GetSetupBuildNumber.py", that uses win32 package wich normally would not work executed from a sikuli script for printing the build number. Here is the code: --from win32api import GetFileVersionInfo, LOWORD, HIWORD def get_version_number (filename): info = GetFileVersionInfo (filename, "\\") ms = info['FileVersionMS'] ls = info['FileVersionLS'] return HIWORD (ms), LOWORD (ms), HIWORD (ls), LOWORD (ls) if __name__ == '__main__': import os filename = os.environ["COMSPEC"] print (".".join ([str (i) for i in get_version_number (path_to_file)]))-- Then inside the sikuli script I have a function that looks like this: --def get_build_number_from_exe_file(): theproc = subprocess.Popen(path_to_file, shell = True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT) tmp = theproc.stdout.read() theproc.communicate() print tmp -- So what It does, it executes a python script that prints the build number in the console. Then it is read from the console and stored in 'tmp' variable. -- 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 #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 RaiMan proposed the following answer: since "get the build number of an .exe file" is not part of my daily business ;-) I am sorry to leave you alone with 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 #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 Asheru posted a new comment: @Manfred Hampl Hmm, i wanted to avoid the use of images for this. @RaiMan Ok then, it seems I have to to some research. -- 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 #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 RaiMan proposed the following answer: It is true, that you cannot use the Python package win32com, since The Python interpreter with SikuliX is the Java based Jython, which cannot access C-based stuff, as is possible with the Python interpreter. But you can try using the package com.sun.jna.platform.win32, which is included in SikuliX, since we need it for various features, that need to access system API's like Win32. You have to learn how to use Java classes from within Jython/SikuliX scripts and then the Win32 world is open for you ;-) -- 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 #688872]: Get build number of .exe file
Question #688872 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/688872 Status: Open => Answered Manfred Hampl proposed the following answer: How would you do that without sikuli? Probably: File explorer - navigate to the .exe file - right mouse button - properties - details And these steps can of course be automated using sikuli. -- 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 #688872]: Get build number of .exe file
New question #688872 on Sikuli: https://answers.launchpad.net/sikuli/+question/688872 Hello, I want to know if it's possible to get the build number of an .exe file. I have found some examples but they require win32com package and from what I have found it's not working with sikuliX since it's not written fully in python. Is there any other way? -- 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