sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #57176
Re: [Question #697117]: store captured image as variable into a py file
Question #697117 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697117
Ben Dix posted a new comment:
yeah, I got it how to rename the file 😄
fyi
import os
a = "name"
capture(Region(99,90,133,119),a)
os.rename(r'/Users/MYNAME/Desktop/Sikulix/scripts/AAANewScripts/screen_capture_test.sikuli/_'
+ str(a) +
'.png',r'/Users/MYNAME/Desktop/Sikulix/scripts/AAANewScripts/screen_capture_test.sikuli/'+
str(a) + '.png')
first I failed using shortcuts, but now I think I get it 😄
here_it_is = (getBundlePath() + '/')
print(here_it_is)
os.rename(r'' + str(here_it_is) + '_' + str(a) + '.png',r'' + str(here_it_is) + str(a) + '.png')
so looks like this question is solved, still looking for the way to
write the image with its name as variable at the end of an existing py
file 😄
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.