Nahuel Posted August 5, 2007 Share Posted August 5, 2007 I've just downloaded and installed Au3lib. I tried this:#include <A3LScreenCap.au3> _ScreenCap_Capture(@DesktopDir &'\Screenshot.jpg') Exitand this is what I get when I run it:what should I do? Link to comment Share on other sites More sharing options...
Generator Posted August 5, 2007 Share Posted August 5, 2007 It works here, are you sure you are runnin in Windows XP and AutoIt v.3.2.4.9 Link to comment Share on other sites More sharing options...
Nahuel Posted August 6, 2007 Author Share Posted August 6, 2007 Where does it say I need XP? Nah, I wave win98... Link to comment Share on other sites More sharing options...
Generator Posted August 6, 2007 Share Posted August 6, 2007 Many stuff in AutoIt doesn't work with Win98, WinNT, i ranyour script it was fine, just double check your Au3Lib and try on XP. Link to comment Share on other sites More sharing options...
Nahuel Posted August 6, 2007 Author Share Posted August 6, 2007 Thanks! I'll try it on my other comp. Just one question, if I compile the script on a computer with XP and then run the .exe on this one... would it work? Link to comment Share on other sites More sharing options...
Gif Posted August 6, 2007 Share Posted August 6, 2007 (edited) i dont understand why this error comes up, are you sure you are testing this code? cause i see in the msgbox , Edited August 6, 2007 by Gif Link to comment Share on other sites More sharing options...
Nahuel Posted August 6, 2007 Author Share Posted August 6, 2007 Yeah! There's an error with the include file, apparently. I haven't tried it on XP. Have you? Link to comment Share on other sites More sharing options...
Gif Posted August 6, 2007 Share Posted August 6, 2007 Yeah! There's an error with the include file, apparently. I haven't tried it on XP. Have you?of course i have, as almost everyone in the forums , if it didnt work PaulIa wouldnt add it to the download section..but yet if you want to use this code you can, most people have XP or Vista... Link to comment Share on other sites More sharing options...
ChrisL Posted August 6, 2007 Share Posted August 6, 2007 (edited) That return value is in this function in ; #FUNCTION# ==================================================================================================== ================ ; Description ...: Initialize Microsoft Windows GDI+ ; Parameters ....: ; Return values .: Success - True ; Failure - False ; Author ........: Paul Campbell (PaulIA) ; Remarks .......: Call _GDIP_Startup before you create any GDI+ objects. GDI+ requires a redistributable for applications that ; run on the Microsoft Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Me operating systems. ; Related .......: _GDIP_Shutdown ; ==================================================================================================== =========================== Func _GDIP_Startup() Local $pInput, $tInput, $pToken, $tToken, $aResult $giA3LGDIPRef += 1 if $giA3LGDIPRef > 1 then Return True $ghA3LGDIPDll = DllOpen("GDIPlus.dll") _Lib_Check("_GDIP_Startup (GDIPlus.dll not found)", @Error, -1) $tInput = DllStructCreate($tagGDIPSTARTUPINPUT) $pInput = DllStructGetPtr($tInput) $tToken = DllStructCreate("int Data") $pToken = DllStructGetPtr($tToken) DllStructSetData($tInput, "Version", 1) $aResult = DllCall($ghA3LGDIPDll, "int", "GdiplusStartup", "ptr", $pToken, "ptr", $pInput, "ptr", 0) $giA3LGDIPToken = DllStructGetData($tToken, "Data") Return $aResult[0] <> 0 EndFunc I've nerer seen a return value like this "Return $aResult[0] <> 0" Although it looks like PaulIA uses this return type in several of his UDF's Edit: Looks like it makes the return value True or False Edited August 6, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Nahuel Posted August 6, 2007 Author Share Posted August 6, 2007 of course i have, as almost everyone in the forums , if it didnt work PaulIa wouldnt add it to the download section..but yet if you want to use this code you can, most people have XP or Vista...No no, that's not what I meant. I meant that there's an error with my computer and Win98, obviously... Ah that sucks.. I think it's time for a new computer, hehe... this is quite useful. thanks for your help. Link to comment Share on other sites More sharing options...
splatz Posted September 17, 2007 Share Posted September 17, 2007 I had this same problem on a Windows 2000 system. I discovered that the problem was because the system did not have GDI+. You need to include the DLL in the same directory as your EXE, then it should work fine. (FYI - All Windows XP systems come with it automatically, which is why this is a rare issue nowadays)Link to GDI download at Microsoft:http://www.microsoft.com/downloads/details...;displaylang=en Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 17, 2007 Moderators Share Posted September 17, 2007 That return value is in this function in ; #FUNCTION# ==================================================================================================== ================ ; Description ...: Initialize Microsoft Windows GDI+ ; Parameters ....: ; Return values .: Success - True ; Failure - False ; Author ........: Paul Campbell (PaulIA) ; Remarks .......: Call _GDIP_Startup before you create any GDI+ objects. GDI+ requires a redistributable for applications that ; run on the Microsoft Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Me operating systems. ; Related .......: _GDIP_Shutdown ; ==================================================================================================== =========================== Func _GDIP_Startup() Local $pInput, $tInput, $pToken, $tToken, $aResult $giA3LGDIPRef += 1 if $giA3LGDIPRef > 1 then Return True $ghA3LGDIPDll = DllOpen("GDIPlus.dll") _Lib_Check("_GDIP_Startup (GDIPlus.dll not found)", @Error, -1) $tInput = DllStructCreate($tagGDIPSTARTUPINPUT) $pInput = DllStructGetPtr($tInput) $tToken = DllStructCreate("int Data") $pToken = DllStructGetPtr($tToken) DllStructSetData($tInput, "Version", 1) $aResult = DllCall($ghA3LGDIPDll, "int", "GdiplusStartup", "ptr", $pToken, "ptr", $pInput, "ptr", 0) $giA3LGDIPToken = DllStructGetData($tToken, "Data") Return $aResult[0] <> 0 EndFunc I've nerer seen a return value like this "Return $aResult[0] <> 0" Although it looks like PaulIA uses this return type in several of his UDF's Edit: Looks like it makes the return value True or FalseI do this often myself for a bool return Chris. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now