Sign in to follow this  
Followers 0
SorryButImaNewbie

_ScreenCapture_CaptureWnd problem, it works in all functions except one

5 posts in this topic

Hello!

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
    Sleep(1000)
    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ó", "")
    Sleep(500)
    Local $Egyenleg = WinGetHandle("Információ", "") ;MsgBox I want to save
    _ScreenCapture_CaptureWnd(@MyDocumentsDir & $date & "ÜKegyenleg.jpg", $Egyenleg)
    Sleep(400)
    WinKill("Információ")

;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.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

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
1 person likes this

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

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

Spoiler

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)

userbar.png

Share this post


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)

Share this post


Link to post
Share on other sites

Glad you were able to get it resolved.


√-1 2^3 ∑ π, and it was delicious!

Share this post


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
Sign in to follow this  
Followers 0