Jump to content

frankzappa

Members
  • Posts

    14
  • Joined

  • Last visited

frankzappa's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. hoho, i think this one must be a bug.... Anyway, i found a way to work the thing around. cheers.
  2. Hey all, i need to save a monochromatic BMP file. I've been using ScreenCapture for these kind of tasks, so i was trying to stick with it. The problem is that ScreenCapture doesn't save monochromatic files normally. I checked the code and GDIPLus (called by ScreenCapture) does have the possibility to save these kind of files: CODE; Pixel Format constants Global Const $GDIP_PXF01INDEXED = 0x00030101 ; 1 bpp, indexed So i changed the code for ScreenCapture.au3 (had to save it somewhere else and change its name) to allow me save monochromatic BMPs. The problem is that the file is not created, so i think this may be a bug from GDIPlus. The code edited in ScreenCapture: CODEFunc _ScreenCapture_SetBMPFormat($iFormat) Switch $iFormat Case 0 $giBMPFormat = $GDIP_PXF16RGB555 Case 1 $giBMPFormat = $GDIP_PXF16RGB565 Case 2 $giBMPFormat = $GDIP_PXF24RGB Case 3 $giBMPFormat = $GDIP_PXF32RGB Case 4 $giBMPFormat = $GDIP_PXF32ARGB Case 5 $giBMPFormat = $GDIP_PXF01INDEXED ;edited Case Else $giBMPFormat = $GDIP_PXF24RGB EndSwitch EndFunc ;==>_ScreenCapture_SetBMPFormat I've checked if saving BMP in the normal formats was working, everythings fine as long as i stick to case 2 ($GDIP_PXF24RGB). So, does anyone had this problem oneday? cheers.
  3. hohoho, exact answer. Thanks mate, now its working!
  4. Hey all, i'm trying to use a DLL i wrote with my autoit script, but i'm stuck with a problem. The DLL is ready, everything seems fine with it, so i wrote thos lines in my autoit script: CODE$DLL = DllOpen("DaBrainDll.dll") $i = DllCall($DLL, "int", "StartUp") msgbox(0, "", $i & " " & @error) So, the call to DLLOpen is working ($DLL = 1), but the call to the function do not have any answers, i mean, the msgbox is empty... Just to show how things are on the other side, my .def file for the DLL is EXPORTS StartUp ShutDown ReadEvents SetXML Action And the .cpp is like this: int _stdcall StartUp() {etc...} Well, do someone see something wrong here? thanks.
  5. The problem was in the path, as Wolverine said. FileFindFisrtFile doesn't return the hole file name with the path, you have to add it by yourself. Thanks!
  6. hey all, i'm trying to use FileGetTime in a bot but i'm stuck in this error: CODE$temp = FileFindNextFile($search) $d = FileGetTime($temp) $date = $d[0] & $d[1] & $d[2] & $d[3] & $d[4] & $d[5] the error i got is the following: ==> Subscript used with non-Array variable.: $date = $d[0] & $d[1] & $d[2] & $d[3] & $d[4] & $d[5] $date = $d^ ERROR Can someone help me? thanks from the newbie...
  7. i'm having the same problem here. I've tried the other 2 solutions presented, they dont work. Anyone to save the day on this one? CODE$temp2 = """ $temp = StringLeft($temp, StringInStr($temp, " balance")) $temp = StringRight($temp, StringLen($temp) - StringInStr($temp, "name=")) StringReplace($temp, $temp2, "") I'm using the $temp2 variable because if i write directly StringReplace($temp, """, "") SciTe doesn't understand. I've tried things like "\"", doesn't work neither.... thanks.
  8. Hey all, i'm trying to use a simple java application in a script, but neither Run nor ShellExecute can help me on this one. I'd like to know if someone knows how to do it in a clean way. An example (that obviously doesn't work), just to show what's the idea... CODEShellExecute("java MainCommandLine", "-comments", "C:\Directory_of_the_app") cheers.
  9. I use an external exec to convert the JPG files to text with a free soft called GOCR. Just google "gocr voice" and you'll find the thing. cheers
  10. Hohoho, i've checked my version of Autoit...3.2.8 i installed the last one, everything works fine. Sorry for taking your time..thanks again!
  11. Mine is the last one too. I'm taking a look on the code, in GDIPlus it calls a dll called GDIPLus.dll all the time. I've checked, it's in my system32 directory, but this reminds me of another problem i had. When i was first running the scripts it couldn't find the include files. I had to copy the hole directory "include" to the "examples" (where i'm working). Maybe there's a problem in finding the path to things?... Maybe what i'm saying is just nonsense, but ive been working on this one for the last days, i'm aiming to anything that moves... Cheers
  12. Hey, thanks for helping. But no, it doesn't create the file. Do Autoit have any imcompatibility with some Antivirus, other soft, etc? Do i have to make any other modifications on the libraries? I've just changed the problems that appeared when i was compiling the script...
  13. Hi all, i've checked all topics on ScreenCapture and it seems that no one has this problem i'm having here. To simplify the matter, the script CODE #include <ScreenCapture.au3> _ScreenCapture_Capture("c:\teste.bmp") doesn't create the file teste.bmp. Ive checked if _ScreenCapture_Capture was returning something by doing this CODE#include <ScreenCapture.au3> global $var $var = _ScreenCapture_Capture("") MsgBox(0, "hohoho", $var) and checked that something different from 0 was being returned by the function. I've tried everything from using other functions like CaptureWnd, the GDIPlus functions, CODE#include <GDIPlus.au3> #include <WinAPI.au3> #include <ScreenCapture.au3> global $var, $hImage _GDIPlus_Startup() $var = _ScreenCapture_Capture("") $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($var) _GDIPlus_ImageSaveToFile ($hImage, @ScriptDir & "\teste.bmp") MsgBox(0, "hohoho", $var) _GDIPlus_ImageDispose ($hImage) _WinAPI_DeleteObject ($handleWND) _GDIPlus_Shutdown() MsgBox(0, "hohoho", $var) but nothing's working. I work under XP SP2. I had to make some changes on ScreenCapture.au3 (delcare some variables) and GDIPlus.au3 (the return error problems, explained in another topic) so that the script could launch. Does anyone imagine why the hell nothing's working?....thanks for the help
×
×
  • Create New...