Jump to content

_ScreenCapture_CaptureWnd problem, it works in all functions except one

Go to solution Solved by JLogan3o13,

Recommended Posts


I'm trying to save some MsgBoxes, from the GUI my script is interacting with. It should be pretty simple, yet one function seems to have a problem with it.

I used it the same way with my other functions, and they all save it to my directory, but the last one doesn't. I can see that the script activate the window i want to save while I'm running it, but the save doesnt happen. I can't really show the whole function, but i can tell its pretty basic, since i wrote it. If you tink more code would help, ask and i delivery what i can.

Thank you for the help4

WinKill("Információ") ;an other window, informing me of irrelevant data, Its here because of the same name, and I thought it might have something ot do with the problem
    WinActivate("Folyószámla","");already existing window
    ControlClick("Folyószámla", "", "[CLASSNN:TAdvBitBtn12]") ;button that opens the MsgBox i want to save
    WinWaitActive("Információ", "")
    Local $Egyenleg = WinGetHandle("Információ", "") ;MsgBox I want to save
    _ScreenCapture_CaptureWnd(@MyDocumentsDir & $date & "ÜKegyenleg.jpg", $Egyenleg)

;during the same time I handle a PDFCreator same as the other functions that runs well. PDFCreator window should be popping up automaticly, and i activate the above.
Link to post
Share on other sites
  • Moderators
  • Solution

Your path has no :

_ScreenCapture_CaptureWnd(@MyDocumentsDir & $date & "ÜKegyenleg.jpg", $Egyenleg)

Should be more like

_ScreenCapture_CaptureWnd(@MyDocumentsDir & "\" & $date & "\ÜKegyenleg.jpg", $Egyenleg)
Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

Do you have a leading backslash in your $date variable, at least?

P.S. I cogitated too long and JLogan... beat me to it.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Link to post
Share on other sites

Thanks! I guess I start to get a bit careless nearing the end of my shift. On the other PrtScn-s I added the "" to the $date, which I forgot to do at the last one.

(Note to self: I should also post the creation of all my variables that appear in my code, will try to do that next time, it also makes me check myself before simple questions)

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...