[solved]name of a printscreen to be a variable

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

[solved]name of a printscreen to be a variable

08 Oct 2013, 08:51

http://www.autohotkey.com/board/topic/7 ... matically/ ; the original post, scroll down to see http://www.autohotkey.com/board/user/16360-g-sperotto/'s post
Spoiler
please help regarding this ==> Gdip_SaveBitmapToFile(pBitmap, "File.png" ; i want File.png to be a variable, how?

Thanks in advance.
Last edited by smorgasbord on 08 Oct 2013, 10:13, edited 1 time in total.
John ... you working ?
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: name of a printscreen to be a variable

08 Oct 2013, 08:54

Code: Select all

var := "File.png"
Gdip_SaveBitmapToFile(pBitmap, var)
dont work?
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: name of a printscreen to be a variable

08 Oct 2013, 08:56

trying now!
John ... you working ?
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: name of a printscreen to be a variable

08 Oct 2013, 09:04

that is a not a variable i guess if you put it in "". so it did not work
:? :? :?
John ... you working ?
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: name of a printscreen to be a variable

08 Oct 2013, 09:07

Code: Select all

test := "Hallo"

var1 := test                ; another var   ==> Hallo
var2 := "File.png"          ; Single Quotes ==> File.png
var3 := """File.png"""      ; Double Quotes ==> "File.png"

MsgBox, % var1 "`n" var2 "`n" var3
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: name of a printscreen to be a variable

08 Oct 2013, 09:29

here is the complete code, i want the image to be saved with %line%.png but i cannot :( Thanks
Spoiler
John ... you working ?
just me
Posts: 9576
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: name of a printscreen to be a variable

08 Oct 2013, 09:46

Code: Select all

var := "C:\Users\smorgasbord\Desktop\smor\" . line . ".png"
?
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: name of a printscreen to be a variable

08 Oct 2013, 09:52

just me wrote:

Code: Select all

var := "C:\Users\smorgasbord\Desktop\smor\" . line . ".png"
?

:? not working. :(
John ... you working ?
just me
Posts: 9576
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: name of a printscreen to be a variable

08 Oct 2013, 10:00

Code: Select all

var := "C:\Users\smorgasbord\Desktop\smor\" . line . ".png"
MsgBox, %var%
What does the MsgBox show?
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: name of a printscreen to be a variable

08 Oct 2013, 10:11

I am really sorry. I forgot to change the file name. It works 100% as i want. again sorry.
just me wrote:

Code: Select all

var := "C:\Users\smorgasbord\Desktop\smor\" . line . ".png"
?
thanks for asking "what does msgbox show"

Thanks
John ... you working ?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: DecimalTurn, macromint, peter_ahk and 350 guests