
trucu
Members-
Posts
7 -
Joined
-
Last visited
trucu's Achievements

Seeker (1/7)
0
Reputation
-
Creating diferent pdfs MPDF_UDF.au3
trucu replied to trucu's topic in AutoIt General Help and Support
ok thanks first time I post anything, didnt know how to do it. -
Hello Im trying to make a program that can print diferent paper size with different button, the first prints alright but when I choose another type it print a blank small PDF. This is one of them, the other are aliked but the paper size are different. Func prescribe6x() ;set the properties for the pdf _SetTitle("Reportes " & $aOkqe26NN3) _SetSubject("Haga su cita al 809.562.0005") _SetKeywords("Nutriologa, dietas") _SetUnit($PDF_UNIT_CM) _SetPaperSize("CUSTOM",826.7, 1169.3); A4 landscape _SetZoomMode($PDF_ZOOM_FULLPAGE) _SetOrientation($PDF_ORIENTATION_PORTRAIT) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) _OpenAfter(True);open after generation ;initialize the pdf $pat19=" " & $dayFF & "-" & $monFF & "-" & $yeaFF Local $er=1 $sFilePathBB=@ScriptDir & "\REPORTES\PRESCRIBE\" & "Pnk " & GUICtrlRead($PACIENTE) & " " & $pat19 & ".pdf" $iFileExists = FileExists($sFilePathBB) ; Display a message of whether the file exists or not. Do If $iFileExists Then $sFilePath=@ScriptDir & "\REPORTES\PRESCRIBE\" & "Pnk " & GUICtrlRead($PACIENTE) & " " & $pat19 & "_" & $er & ".pdf" $sFilePath2="Pnk " & $name3 & " " & $sEndDate & "_" & $er & ".pdf" $iFileExists = FileExists($sFilePathBB) $er= $er + 1 $rr=1 Else $rr=0 EndIf Until $rr=0 _InitPDF($sFilePathBB) ;=== load resources used in pdf === ;images: _LoadResImage("taietel35BB", @ScriptDir & "\BASEDATOS\pnk.jpg") ;images: ;fonts: ;_LoadFontStandard("_Times", $PDF_FONT_STD_TIMES) _LoadFontTT("_Arial", $PDF_FONT_ARIAL) _LoadFontTT("_TimesT", $PDF_FONT_TIMES) _LoadFontTT("_Calibri", $PDF_FONT_CALIBRI) _LoadFontTT("_Garamond", $PDF_FONT_GARAMOND) _LoadFontStandard("_Helv", $PDF_FONT_STD_HELVETICA) _LoadFontStandard("_Tim", $PDF_FONT_STD_TIMES) _LoadFontStandard("_Cour", $PDF_FONT_STD_COURIER) ;_LoadFontTT("_Symbol", $PDF_FONT_SYMBOL) ;=== create objects that are used in multiple pages === ;create a header on all pages, except the first: _StartObject("AntetBB", $PDF_OBJECT_ALLPAGES);NOTFIRSTPAGE) ;insert a image already loaded _InsertImage("taietel35BB", 0, 0, _GetPageWidth()/_GetUnit(), _GetPageHeight()/_GetUnit()) _EndObject() ;start a page _BeginPage(0) ;put some graphics, text etc (see the rest) ;text _SetColourFill(0x000000) _DrawText(2.7, 33.19, $dayFF, "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(4.2, 33.19, $monFF, "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(5.4, 33.19, $yeaFF, "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(5, 30.39, StringUpper(GUICtrlRead($PACIENTE)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) IF GUICtrlRead($PRIM1 )=1 Then _SetColourFill(0x000000) _DrawText(18.25, 33.09, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($PRIM2 )=1 Then _SetColourFill(0x000000) _DrawText(19.18, 33.09, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($SEMF )=1 Then _SetColourFill(0x000000) _DrawText(20, 30.32, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($SEXM )=1 Then _SetColourFill(0x000000) _DrawText(20.9, 30.32, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf _SetColourFill(0x000000) _DrawText(23.3, 30.39, StringUpper(GUICtrlRead($EDADX)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(26.5, 30.39, StringUpper(GUICtrlRead($TALLAX)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(6.5, 29.44, $dayFF6, "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(7.8, 29.44, $monFF6, "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(9.1, 29.44, $yeaFF6, "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(13.55, 29.44, StringUpper(GUICtrlRead($PESOA)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(19.85, 29.44, StringUpper(GUICtrlRead($CINTUR)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(5.9, 25.04, StringUpper(GUICtrlRead($metodop)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) IF GUICtrlRead($PAS1 )=1 Then _SetColourFill(0x000000) _DrawText(15.75, 25.04, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($PAS2 )=1 Then _SetColourFill(0x000000) _DrawText(16.85, 25.04, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf _SetColourFill(0x000000) _DrawText(6.4, 17.09, StringUpper(GUICtrlRead($PASO1T)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(6.4, 16.14, StringUpper(GUICtrlRead($PASO1D)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(9.7, 17.09, StringUpper(GUICtrlRead($PASO2T)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(9.7, 16.14, StringUpper(GUICtrlRead($PASO2D)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(12.8, 17.09, StringUpper(GUICtrlRead($PASO3T)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(12.8, 16.14, StringUpper(GUICtrlRead($PASO3D)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(16.1, 17.09, StringUpper(GUICtrlRead($PASO4T)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(16.1, 16.14, StringUpper(GUICtrlRead($PASO4D)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(19.3, 17.09, StringUpper(GUICtrlRead($PASO5T)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) _SetColourFill(0x000000) _DrawText(19.3, 16.14, StringUpper(GUICtrlRead($PASO5D)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) IF GUICtrlRead($VITA )=1 Then _SetColourFill(0x000000) _DrawText(2.3, 15.34, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($SODI )=1 Then _SetColourFill(0x000000) _DrawText(4.6, 15.34, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($POTAS )=1 Then _SetColourFill(0x000000) _DrawText(6.4, 15.34, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($CALC )=1 Then _SetColourFill(0x000000) _DrawText(8.4, 15.34, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($MAGNE )=1 Then _SetColourFill(0x000000) _DrawText(10.2, 15.34, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($OMEG )=1 Then _SetColourFill(0x000000) _DrawText(12.55, 15.34, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf _SetColourFill(0x000000) _DrawText(10.2, 14.64, StringUpper(GUICtrlRead($OBSERV)), "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) IF GUICtrlRead($PROG1 )=1 Then _SetColourFill(0x000000) _DrawText(12.5, 13.76, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf IF GUICtrlRead($PROG2 )=1 Then _SetColourFill(0x000000) _DrawText(13.5, 13.76, "X", "_Helv", 14, $PDF_ALIGN_LEFT, 0) _SetColourFill(0) EndIf _EndPage() ;then, finally, write the buffer to disk _ClosePDFFile() $_Buffer = "" ;~ Reset Buffer $_Images = "" ;~ Reset Resource Images $_Pages = 0 ;~ Reset Pages to 0 EndFunc
-
Saving a Shockwave.flash as an Image?
trucu replied to trucu's topic in AutoIt General Help and Support
Im using your solution but with _ScreenCapture_CaptureWnd but I dont know how to run it more than once, I making 3 charts in a new Gui and Img making _ScreenCapture_CaptureWnd(@ScriptDir & "\tabla\imc.jpg", $press, 20, 30, 320, 250 ) _ScreenCapture_CaptureWnd(@ScriptDir & "\tabla\pesoa.jpg", $press, 350, 30, 320, 250 ) _ScreenCapture_CaptureWnd(@ScriptDir & "\tabla\grasa.jpg", $press, 680, 30, 320, 250 ) But it only working the first one. -
Saving a Shockwave.flash as an Image?
trucu replied to trucu's topic in AutoIt General Help and Support
yeah I wanted to be easier because the graph are in the Gui program in one tab, so if is not in that tab it wont screencapture the chart that I want to print. -
Hi will like to know if there a way for me to save any shockwave.flash as an image of the actual frame. My problem is I have a chart that is made with shockwave.flash using xml file but I want to print it out in a PDF but I can paste an image but I dont know how to do it. Can anyone help?
-
'how to run multiple _Timer_SetTimer with a wokring script'.
trucu replied to trucu's topic in AutoItX Help and Support
Here is my problem Im running a Script that is working with a timer, but this script is also making new _Timer_SetTimer for a WM_TIMER to check and run the script again. But I got multuples variables in that script. is like Timer1 60 sc or what the script says Timer2 70 sec Timer3 80 sec the scripts takes like 20 sc to run So WM_TIMER doesnt read the Timer2 cos the script is running. is there another way or better a way to save the timer and put another script to check it out this original, so this can say to the original script that there was a timer that past so better run it ASAP. What can I do?