![]() |
Postmessage function in QTP for simulating Printscreen key does not work - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Postmessage function in QTP for simulating Printscreen key does not work (/Thread-Postmessage-function-in-QTP-for-simulating-Printscreen-key-does-not-work) |
Postmessage function in QTP for simulating Printscreen key does not work - steelbird - 07-11-2013 I am using the following code to simulate a PrintScreen button press to capture the image of a Internet Explorer window. I have assigned Printscreen as a Hotkey in Greenshot tool to capture the image of the full page in one go without having to scroll. Code: Extern.Declare micLong, "PostMessage", "user32.dll", "PostMessageA", micHwnd, micLong, micLong, micLong Could someone please help me out with this. RE: Postmessage function in QTP for simulating Printscreen key does not work - Staff - 07-11-2013 Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time. RE: Postmessage function in QTP for simulating Printscreen key does not work - Ankur - 07-11-2013 Did you try with CaptureBitmap? Its syntax is Code: object.CaptureBitmap FullFilename, [OverrideExisting] Also avoid locking of a screen while running QTP scripts. You can take help of a tool like caffeine RE: Postmessage function in QTP for simulating Printscreen key does not work - vinod123 - 07-11-2013 instead of using this method i will send u the function and how to use that but this code i posted in the articles in the forum if u did not get it i will send u again Code: Public Sub CaptureScreenshot( ByRef Sender, ByVal micStatus, ByVal descriptionStr ) Code: RegisterUserFunc "Page", "CaptureScreenshot", "CaptureScreenshot" Code: Browser("micclass:=Browser").Page("micclass:=Page").CaptureScreenshot micPass, "<h4 align = ""Center"">Page SuccessFully Displayed</h4>" write the function which i have written above in a library function and add it to the script |