vkrisz81 Posted October 4, 2019 Posted October 4, 2019 Hello! I made a small script for this task: focus to chrome, in chrome open dev panel (f12), and here i want to send ctrl+shifht+p which should drop me a command line. from keyboard it works, but from script does not. can anybody help me what may be the problem? i tried these: func go() WinActivate($hnd) send("{F12}") sleep(300) ;~ WinActivate($hnd) send("{LCTRL}{LSHIFT}p") ;~ send("{CTRLDOWN}{SHIFTDOWN}P") ;~ send ("^+p") sleep(100) ;~ Send("{CTRLUP}{SHIFTUP}") sleep(200) EndFunc but noone version worked. the "^+p" drops me a printer window.. similar than {ctrl}p how can i send the ctrl shift p ? thank you! the main task is that i must make screenshot about some webpages and i was looking for easy and well handled versions but i did not find so i thought i make one which sends to chrome the "capture full size screenshot"
Danp2 Posted October 4, 2019 Posted October 4, 2019 There are screenshot functions that are part of the Webdriver UDF. If interested in more info, see my sig. Latest Webdriver UDF Release Webdriver Wiki FAQs
vkrisz81 Posted October 4, 2019 Author Posted October 4, 2019 very thank you but actually i have very very limited freetime :S and this needed immediatley. i have no time to trying.. later i willbut this weekend is when i needed very! so i cant send hotkey for chrome? or can you make a very small script for making a simple screenshot of the entire page? i woud place it to a hotkey function..
Danp2 Posted October 4, 2019 Posted October 4, 2019 (edited) Haven't tried to duplicate your scenario, so can't really comment on the hotkey thing. FWIW, there's an example of capturing a full webpage in wd_demo.au3 Edited October 4, 2019 by Danp2 typo Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted October 4, 2019 Posted October 4, 2019 Looking at your code, I'd suggest adding the following after your initial Send command -- WinActivate("DevTools") Latest Webdriver UDF Release Webdriver Wiki FAQs
Exit Posted October 4, 2019 Posted October 4, 2019 2 hours ago, vkrisz81 said: I made a small script for this task: And then you should also show the whole script, so that we can reproduce it without additional code App: Au3toCmd UDF: _SingleScript()
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now