AutoHotkey Community

It is currently May 27th, 2012, 4:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: July 7th, 2011, 4:51 pm 
Offline

Joined: November 24th, 2008, 7:22 pm
Posts: 73
Please ignore... I was using GDip in another part of the script which then got shut by my last line. Duh. Silly me.

-----------------------------------------


I have a captured bitmap on the clipboard and am trying to use the following to save it to a file:

Code:
FileSelectFile selectedFiles, , %Config_general_getFileFrom%, Save to, *.jpg; *.bmp, *.png
   if (selectedFiles = "")
      Return
   if ( FileExist(selectedFiles) )
   {
      Msgbox, 1,, File exists. Overwrite it?
      IfMsgBox Cancel
         Return
   }
   Gosub, saveSettings
   pToken := Gdip_Startup()
   Gdip_SaveBitmapToFile(pBitmap := Gdip_CreateBitmapFromClipboard(), selectedFiles)
   Gdip_DisposeImage(pBitmap)
   Gdip_Shutdown(pToken)
Return


The file is created properly and can be opened with any image editing software but the first time the resulting .jpg is accessed it crashes my AHK script which is persistent. Am I not using the library properly?

Relayer


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], patgenn123, rbrtryn and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group