Leaderboard
Popular Content
Showing content with the highest reputation on 07/07/2016 in all areas
-
Global $ver = "by algiuxas" Global $GUITitle = "3D render " & $ver Global $GUI_Loading = GUICreate($GUITitle, 616, 37, -1, 100, -2147483648) GUISetBkColor(0x000000) Global $GUI_Loading_Ctrl_Label = GUICtrlCreateLabel("Loading...", 8, 8, 600, 23, 1) GUICtrlSetFont(-1, 12, 800, 0, "Consolas") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) Func _GUI_CL($Text) GUICtrlSetData($GUI_Loading_Ctrl_Label, $Text) EndFunc ;==>_GUI_CL #Region # Data _GUI_CL("Loading data...") Global $SizeX = 480 Global $SizeY = 320 Global $CtrX = $SizeX / 2 Global $CtrY = $SizeY / 2 Global $DPI = 84 Global $GM_BgColor = 0x33AAFF Global $GM_FPS_MAX = 0 #EndRegion # Data #Region # P-Data Global $GM_EXT = False #EndRegion # P-Data #Region # GUI _GUI_CL("Loading GUI...") #include <GUIConstantsEx.au3> Global $GUI = GUICreate($GUITitle, $SizeX, $SizeY) GUISetBkColor(0x000000) Opt("GUIOnEventMode", 1) OnAutoItExitRegister("GM_Exit") GUISetOnEvent($GUI_EVENT_CLOSE, "GM_Exit", $GUI) #EndRegion # GUI #Region # GDIPlus _GUI_CL("Loading GDI+ functions...") #include <GDIPlus.au3> _GDIPlus_Startup() Global $Graphics = _GDIPlus_GraphicsCreateFromHWND($GUI) Global $Bitmap = _GDIPlus_BitmapCreateFromGraphics($SizeX, $SizeY, $Graphics) Global $GfxCtxt = _GDIPlus_ImageGetGraphicsContext($Bitmap) #EndRegion # GDIPlus #Region # Images _GUI_CL("Loading images...") #EndRegion # Images #Region # Keyboard Data _GUI_CL("Loading input data...") #include <Misc.au3> #EndRegion # Keyboard Data #Region # Calculation #include <Math.au3> Const $PI = 3.14159256358979 ConsoleWrite("PI=" & $PI & @CRLF) Const $PI180 = $PI / 180 ConsoleWrite("PI180=" & $PI180 & @CRLF) Const $DRAD = Round($PI180, 7) ConsoleWrite("DRAD=" & $DRAD & @CRLF) #EndRegion # Calculation #Region # Colors Global $Brush_T77_000000 = _GDIPlus_BrushCreateSolid(0x77000000) Global $Brush_T77_FFFFFF = _GDIPlus_BrushCreateSolid(0x77FFFFFF) Global $Pen_TFF_000000 = _GDIPlus_PenCreate(0xFF000000) Global $Pen_TFF_FFFFFF = _GDIPlus_PenCreate(0xFFFFFFFF) #EndRegion # Colors #Region # Etc. Data _GUI_CL("Loading other things...") Global $GM_CFPS = 0 Global $GM_CFPS_F = 0 Global $GM_CFPS_TI = TimerInit() Global $GMS = 0 Global $GM_SH = TimerInit() Global $GM_Cursor[5] Global $GM_Active = 0 #EndRegion # Etc. Data #Region # Render Data Global $FOV = FOV(90) #EndRegion # Game Data #cs $GM_Cursor[0-3] = [X,Y,1,2] $GM_Active = ACTIVE I/O $GMS = 1/FPS #ce $x = 0 $y = 0 $z = 0 GUIDelete($GUI_Loading) GUISetState(@SW_SHOW) While 1 GM_Loop() #Region# Testing area Local $posarrn[4][3] = [[0, 5, 4], [-2, 7, 4], [0, 7, 4], [0, 7, 6]] Local $rotarr[3] = [$GM_Cursor[1]/150-$CtrX, -$GM_Cursor[0]/150-$CtrY, $z] Local $posarr = _3DrotArrMulti($rotarr, $posarrn,4) _3D_Pyra_3base($posarr) #EndRegion # Testing area _GDIPlus_GraphicsDrawString($GfxCtxt, "FPS: " & $GM_CFPS, 10, 10) _GDIPlus_GraphicsDrawString($GfxCtxt, "3DG " & $ver, 10, $SizeY - 30) WEnd Func _3D_Vector($pa, $lbrush = 0x77000000) ;[3][3] = [[x,y,z],[x,y,z],[x,y,z]] ;Triangle Local $aPnt Local $aPoints[4][2] $aPoints[0][0] = 3 $aPnt = _3Dpos($pa[0][0], $pa[0][1], $pa[0][2]) $aPoints[1][0] = $aPnt[0] $aPoints[1][1] = $aPnt[1] $aPnt = _3Dpos($pa[1][0], $pa[1][1], $pa[1][2]) $aPoints[2][0] = $aPnt[0] $aPoints[2][1] = $aPnt[1] $aPnt = _3Dpos($pa[2][0], $pa[2][1], $pa[2][2]) $aPoints[3][0] = $aPnt[0] $aPoints[3][1] = $aPnt[1] If lineAbw($aPoints[2][0],$aPoints[2][1],$aPoints[1][0],$aPoints[1][1],$aPoints[3][0],$aPoints[3][1]) Then Local $hBrush = _GDIPlus_BrushCreateSolid($lbrush) _GDIPlus_GraphicsFillPolygon($GfxCtxt,$aPoints, $hBrush) _GDIPlus_BrushDispose($hBrush) EndIf EndFunc ;==>_Draw_Vector Func _3D_Pyra_3base($pr, $lBrush1 = 0xFFFF0000, $lBrush2 = 0xFFFFFFFF, $lBrush3 = 0xFF00FF00, $lBrush4 = 0xFF0000FF) ;[4][3] = [[x,y,z],[x,y,z],[x,y,z],[x,y,z]] ; 0 ; /\\ ; / \ \ ; / \ \ ; /______\--3 ; 1 2 _3D_Vector(_ArrayWR3($pr,0,1,2),$lBrush1) _3D_Vector(_ArrayWR3($pr,0,2,3),$lBrush2) _3D_Vector(_ArrayWR3($pr,0,3,1),$lBrush3) _3D_Vector(_ArrayWR3($pr,3,2,1),$lBrush4) EndFunc ;==>_3D_Pyra_3base Func _ArrayWR1($pa,$i) Local $paa[3] $paa[0] = $pa[$i][0] $paa[1] = $pa[$i][1] $paa[2] = $pa[$i][2] Return $paa EndFunc Func _ArrayWR3($pa,$i1,$i2,$i3) Local $paa[3][3] $paa[0][0] = $pa[$i1][0] $paa[0][1] = $pa[$i1][1] $paa[0][2] = $pa[$i1][2] $paa[1][0] = $pa[$i2][0] $paa[1][1] = $pa[$i2][1] $paa[1][2] = $pa[$i2][2] $paa[2][0] = $pa[$i3][0] $paa[2][1] = $pa[$i3][1] $paa[2][2] = $pa[$i3][2] Return $paa EndFunc Func _3DrotArrMulti($pr, $pp, $a=4) ;[3],[~][3] = ROTATION, POSITION Local $ats[$a][3] For $i = 0 to $a-1 $b = _3Drot($pr[0], $pr[1], $pr[2], $pp[$i][0], $pp[$i][1], $pp[$i][2]) $ats[$i][0] = $b[0] $ats[$i][1] = $b[1] $ats[$i][2] = $b[2] Next Return $ats EndFunc ;==> Func _3DrotArr($pr, $pp) ;ROTATION, POSITION Return _3Drot($pr[0], $pr[1], $pr[2], $pp[0], $pp[1], $pp[2]) EndFunc ;==>_3DrotArr Func _3Drot($x, $y, $z, $xp = 0, $yp = 0, $zp = 0) ;ROTATION, POSITION $XA = _ Cos($y) * Cos($z) * $xp + _ (Cos($z) * Sin($x) * Sin($y) - Cos($x) * Sin($z)) * $yp + _ (Cos($x) * Cos($z) * Sin($y) + Sin($x) * Sin($z)) * $zp $YA = _ (Cos($y) * Sin($z)) * $xp + _ (Cos($x) * Cos($z) + Sin($x) * Sin($y) * Sin($z)) * $yp + _ (-Cos($z) * Sin($x) + Cos($x) * Sin($y) * Sin($z)) * $zp $ZA = _ (-Sin($y)) * $xp + _ (Cos($y) * Sin($x)) * $yp + _ (Cos($x) * Cos($y)) * $zp Local $pos[3] = [$XA, $YA, $ZA] Return $pos EndFunc ;==>_3Drot Func _3DposArr($pos) Return _3Dpos($pos[0], $pos[1], $pos[2]) EndFunc ;==>_3DposArr Func _3Dpos($x, $y, $z) ;REMOVE DISTANCE FROM CENTER! $fvz = Round(($z + 15) / $FOV, 10) Local $pos[2] = [$x * $CtrX / 2 / $fvz + $CtrX, $y * $CtrY / 2 / $fvz + $CtrY] Return $pos EndFunc ;==>_3Dpos Func lineAbw($rx, $ry, $bx, $by, $gx, $gy) Return (($bx - $rx) * ($gy - $ry) - ($by - $ry) * ($gx - $rx) > 0) EndFunc ;==>isTrue Func FOV($FOVdegr = 90) $FOVdegr /= 2 Return Round(ATan($DRAD * $FOVdegr) * 2, 7) EndFunc ;==>FOV Func GM_Loop() $GMS = Floor(TimerDiff($GM_SH)) / 1000 $GM_Cursor = GUIGetCursorInfo() If $GM_Cursor = 0 Then $GM_Active = 0 Else $GM_Active = 1 EndIf If $GM_FPS_MAX Then Do $GMS = Floor(TimerDiff($GM_SH)) / 1000 Until $GMS > 1 / $GM_FPS_MAX EndIf $GM_SH = TimerInit() If TimerDiff($GM_CFPS_TI) > 1000 Then GM_FPS_RC() $GM_CFPS_F += 1 _GDIPlus_GraphicsDrawImage($Graphics, $Bitmap, 0, 0) _GDIPlus_GraphicsClear($GfxCtxt, 0xFF000000 + $GM_BgColor) EndFunc ;==>GM_Loop Func GM_SaveData() GM_CW("Saving data...") ;TODO: Save data GM_CWK("Saving data DONE!") EndFunc ;==>GM_SaveData Func GM_FPS_RC() $GM_CFPS = Floor($GM_CFPS_F * 1000 / Floor(TimerDiff($GM_CFPS_TI))) $GM_CFPS_TI = TimerInit() $GM_CFPS_F = 0 EndFunc ;==>GM_FPS_RC Func GM_Exit() If $GM_EXT = True Then Exit $GM_EXT = True GUIDelete() GM_SaveData() ;TODO: Execute game closing functions _GDIPlus_Shutdown() Exit EndFunc ;==>GM_Exit Func GM_CW($CW) ConsoleWrite("!> " & $CW & @CRLF) EndFunc ;==>GM_CW Func GM_CWK($CW) ConsoleWrite("+> " & $CW & @CRLF) EndFunc ;==>GM_CWK Func getAngle($x1,$y1,$x2,$y2) Return ATAN2($x2-$x1,$y2-$y1) EndFunc Func ATAN2(Const $NY, Const $NX) Const $NPI = 3.14159265358979 Local $NRESULT If IsNumber($NY) = 0 Then SetError(1) Return 0 ElseIf IsNumber($NX) = 0 Then SetError(1) Return 0 EndIf If $NX = 0 Then If $NY > 0 Then $NRESULT = $NPI / 2 ElseIf $NY < 0 Then $NRESULT = 3 * $NPI / 2 Else SetError(2) Return 0 EndIf ElseIf $NX < 0 Then $NRESULT = ATan($NY / $NX) + $NPI Else $NRESULT = ATan($NY / $NX) EndIf While $NRESULT < 0 $NRESULT += 2 * $NPI WEnd Return $NRESULT EndFunc I know that this is a huge mess... I will fix everything later, and make it better. Try this script, and move mouse.2 points
-
Yes you are right, Return $bResult * -1 is bullshit. I was in a hurry because of the football match. Of course it must be Return Not $bResult to invert the result. Btw, there are many ways to solve a problem. Further if your result is = 0 then the green dot is on the line. What is the status then? Your version is of course the fastest and best solution.2 points
-
ConsoleWrite(isTrue(4,1 , 10,10 , 3,9) & @CRLF) Func isTrue($red_x, $red_y, $blue_x, $blue_y, $green_x, $green_y) Return (($blue_x - $red_x) * ($green_y - $red_y) - ($blue_y - $red_y) * ($green_x - $red_x) > 0) EndFunc ;==>isTrue Note that this will also return "false" if the point is ON the line (you didn't specify that so I don't know whether that matters). I'm not sure what you want to happen if the line goes from bottom left to top right or maybe the red/blue points are reversed, i.e. if the line is directed (i.e. the order of the red/blue determines the orientation of true/false), but this solution should work in reverse if the red/blue are reversed. Try it out with a few test values to make sure that this is what you wanted, if not, clarify with a few more examples. This is really more of a math question I guess?2 points
-
I started to work on this UDF and I'd like to discuss, test and improve it with other interested users. The idea is to create a UDF similar to FTPEx, but to support SFTP protocol. Given that this protocol is not natively supported by Windows, I found some candidates to manage it: cURL: http://curl.haxx.se/ PSFTP: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html FZSFTP: http://filezilla-project.org/ I'm trying to use the second one (realied by PuTTY team) and the result is the following code. It is not complete and needs to be widely tested, but main functions work and could be considered as a draft to start the discussion. A possible alternative could be to use FZSFTP (a modified version of PSFTP realized for FileZilla), that includes some interesting improvements to be used by external programs, but does not offer a related documentation. Code version: 1.0 beta 9 (not complete) Previous downloads: 132 SFTPEx.au31 point
-
So I think it's time to publish this little tutorial I have made on using DllCall() and DllStructs. It's not near completion but I think it's a good start at least This tutorial is mostly aimed for people who have never used DllCall() before or have very limited knowledge about it. In the future I will update it with more advanced topics so more advanced users can make use of it too. Well here goes. Dealing_with_Dll.pdf Previous downloads: 31 Suggestions, language corrections and errors in the tutorial is of course welcome.1 point
-
"ICONIMAGE" is a binary struct defined by Microsoft for saving an single icon (See this article in msdn). This UDF is basically for icon management, it takes ICONIMAGE as an binary intermediary to handle icons. With this UDF, you can: Load, save, and convert icon in any size, any format, even can handle Vista PNG icon under Windows XP. Supported icon format: standard or PNG .ico, .png file, or other image files (.bmp/.jpg etc). Source and destination can be files or binary data. Get system associated icon for any files, folders, even links (partial based on _GetIconForFile by WideBoyDixon).Load icons from windows PE files (EXE or DLL).Convert system icon handle or GDI+ image handle from/to icon.Merge/Rotate/Flip icons.Icon cache or script embed icon can be easily realized by this UDF.This UDF need GDI+ for most image conversion. Other required UDF (not included) is my >Binary UDF and >Yashied's WinAPIEx UDF. The example script also need >Yashied's ICON UDF for display icon. Functions List Screenshots of Example Because icon handle is always device dependent. So this UDF should only works on 32bit color device for now. I think most modern system support that. I already do a lot of effort for alpha channel support and test under Windows 7 and Windows XP. But deal with images what system not supported is a painful work. If there still any problem, please tell me. Thanks. IconImage.zip 2011/09/12 Update Note: Add multiple icon support (both loading and saving).Image scale now support specific quality. Quality flag is defined as $GDIP_ModeXXXX.Fix a lot of bugs in handling alpha channel icons and PNG icons. Now even better than Windows 7 does.Update the example script.IconImage.zip 2014/03/19 Update Note: Update for AutoIt v3.3.10.2IconImage.zip1 point
-
Several questions around the forum get asked repeatedly: How to avoid false-positive Anti-Virus detection? Answered by AutoIt god himself How to make AutoIt software safe from hacking? How to prevent AutoIt software being de-compiled? How to prevent exposure of native AutoIt code? The general answers all go in the direction of (a) can't be done or (b) make it an .a3x script. The Wiki contains a single entry under "compiler directives" and the Help File contains mainly compiler info, with this note Also see this thread. So I thought I would make a little demo to actually show how it works. Here are the 2 scripts. The a3x_demo.zip file contains these 2, plus the compiled .a3x file and the .EXE The body #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Outfile=a3x_demo.a3x #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: Skysnake Script Function: Demonstates working of a3x Instructions Code as normal Set Compiler option to .a3x as per Help File Compile Note output is (a) .a3x file, (b) now compile wrapper to make .exe file The compiled .a3x is included inside the .exe. To demonstrate, copy .exe to any new location and run. :) #ce ---------------------------------------------------------------------------- ; Script Start #include <MsgBoxConstants.au3> MsgBox($MB_SYSTEMMODAL, "a3x demo", "This message box is called from an a3x pre-compiled script " & @CRLF & "will timeout after 10 seconds or select the OK button.", 10) ; code ends The wrapper #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=a3x_wrapper.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: Skysnake Script Function: Wrapper for .a3x demo the INCLUDE line below forces the .a3x to be included in the new .EXE other option is to use FileIsntall and then run the a3x_demo.a3x as an external file NOTE: required in order are the following steps 1. body .au3 script 2. compile body .au3 as .a3x file, include in wrapper 3. wrapper .au3 script, to become the .exe -> compile as .EXE #ce ---------------------------------------------------------------------------- ; Script Start - #include "a3x_demo.a3x" ; code ends DOWNLOAD: The ax3_demo.zip file EDIT: 2016.07.08 Fixed typos1 point
-
1 point
-
Just out of curiosity, how did you do all that other math but yet not figure out this question?1 point
-
1 point
-
1 point
-
UEZ' code works with the given numbers, but: It risks division by zero (if $fRY - $fBY equals zero) Return $bResult * -1 is incorrect, as multiplying a boolean with *-1 returns -0 (for true) or -1 (for false). You probably meant Return Not $bResult Have you tried my version? It is much shorter, much faster and probably works better too1 point
-
it works just like i wanted! thank you so much1 point
-
help to linking array data
crackdonalds reacted to water for a topic
This? #include <Array.au3> ; All arrays are 1-based Global $aArrayIn1[2][2] = [[1, 2], ["1.3.6.1.2.1.17.4.3.1.2.0.0.36.208.3.178", "98"]] Global $aArrayIn2[33][2] = [[32, 2]] $aArrayIn2[32][0] = "1.3.6.1.2.1.17.1.4.1.2.98" $aArrayIn2[32][1] = 74 Global $aArrayIn3[75][2] = [[174, 2]] $aArrayIn3[74][0] = "1.3.6.1.2.1.31.1.1.1.1.74" $aArrayIn3[74][1] = "Gi2/0/2" Global $aArrayOut[$aArrayIn1[0][0]][3] For $i = 1 To $aArrayIn1[0][0] For $j = 1 To $aArrayIn2[0][0] If StringTrimLeft($aArrayIn2[$j][0], 23) = $aArrayIn1[$i][1] Then $aIP = StringSplit(StringTrimLeft($aArrayIn1[$i][0], 23), ".", 2) For $k = 0 To UBound($aIP) - 1 $aIP[$k] = Hex($aIP[$k], 2) Next ConsoleWrite(StringTrimLeft($aArrayIn1[$i][0], 23) & " | " & $aArrayIn3[$aArrayIn2[$j][1]][1] & @CRLF) ; decimal ConsoleWrite(_ArrayToString($aIP, ":") & " | " & $aArrayIn3[$aArrayIn2[$j][1]][1] & @CRLF) ; hex ExitLoop EndIf Next Next1 point -
help to linking array data
crackdonalds reacted to water for a topic
Replace this line: ConsoleWrite(StringTrimLeft($aArrayIn1[$i][0], 23) & " | " & $aArrayIn3[$aArrayIn2[$j][1]][1] & @CRLF)1 point -
help to linking array data
crackdonalds reacted to water for a topic
Something like this? #include <Array.au3> ; All arrays are 1-based Global $aArrayIn1[2][2] = [[1, 2], ["1.3.6.1.2.1.17.4.3.1.2.0.0.36.208.3.178", "98"]] Global $aArrayIn2[33][2] = [[32, 2]] $aArrayIn2[32][0] = "1.3.6.1.2.1.17.1.4.1.2.98" $aArrayIn2[32][1] = 74 Global $aArrayIn3[75][2] = [[174, 2]] $aArrayIn3[74][0] = "1.3.6.1.2.1.31.1.1.1.1.74" $aArrayIn3[74][1] = "Gi2/0/2" Global $aArrayOut[$aArrayIn1[0][0]][3] For $i = 1 To $aArrayIn1[0][0] For $j = 1 To $aArrayIn2[0][0] If StringTrimLeft($aArrayIn2[$j][0], 23) = $aArrayIn1[$i][1] Then ConsoleWrite($aArrayIn1[$i][1] & " | " & $aArrayIn3[$aArrayIn2[$j][1]][1] & @CRLF) ExitLoop EndIf Next Next1 point -
Takes 6 seconds here to process your dummy file. When I remove $ES_AUTOVSCROLL + $WS_VSCROLL it dropes to 1.8 seconds.1 point
-
Find location of cell that contains specific text
Laurynelis reacted to water for a topic
Simply set parameter $vRange to the range to be searched e.g. $oWorkbook.Worksheets('SpecificSheetName').UsedRange1 point -
Try this example. Local $var = "The beginning z: <b>1</b><br> z: <b>3</b><br> z: <b>0 (Zero the number that is needed.)</b><br>z: <b>5</b><br> The end" Local $iFindOccurence = 3 Local $varstr = StringRegExpReplace($var, '(?i).*?(?:z:\h*<b>.+?</b><br>\h*){' & ($iFindOccurence - 1) & '}z:\h*<b>([^<]+).*', "$1") ; If "0" is all that is required you could replace "([^<]+)" with "(\d)". MsgBox(0, "Result", $varstr)1 point
-
What I wrote can be used to write to any file. (write a little change) I'm not a regexp man. so I prefer doing it using string functions only. #include <Array.au3> $results = "User Comment : WHO:bobby! sally2-meg,charles ryan,#swimmermike|WHAT:#kickin' it 4real@home!|WHERE:@myhouse|WHEN:2015:02:06|" Local $aStrings = StringSplit($results, "|") Local $iNumberOfFields = $aStrings[0] - 1 If $iNumberOfFields > 0 Then Local $aFields[$iNumberOfFields] Local $aMatch = 0 Local $iStartPos = 0 Local $iIndex = 0 For $i = 1 To $aStrings[0] $aMatch = StringRegExp($aStrings[$i], "WHO:|WHAT:|WHERE:|WHEN:", 3) ;~ _ArrayDisplay($aMatch) If IsArray($aMatch) Then $iStartPos = StringInStr($aStrings[$i], $aMatch[0]) $aFields[$iIndex] = StringMid($aStrings[$i], $iStartPos + StringLen($aMatch[0])) $iIndex += 1 EndIf Next EndIf _ArrayDisplay($aFields) Saludos1 point
-
Sign your exe with a Digital Signature / Signtool.exe
Skeletor reacted to argumentum for a topic
2016.07.01b fixed the installer. At times the template on vista and newer goes to c:\users\All Users\.. ..\Templates 2016.07.01 ; https://www.autoitscript.com/forum/topic/149137-sign-your-exe-with-a-digital-signature-signtoolexe/?do=findComment&comment=1316935 after extensive testing, this is the best I can come up with, to simplify self signing the executable compiled with AutoIt3 from SciTE ( the editor ). Could have given the code more options but I felt at the time of coding that it was practical enough and if you ( the coder ) feel different, the code is in the file to tweak or just plain rewrite. In this ZIP are included the updated utility files from the original distribution of this package plus an installer of sorts called "copy all these to SciTE path.exe", to place the files in the path that the "#AutoIt3Wrapper_Run_After" command can find even if running as a portable setup. The path is %scitedir%\tools\SignThisFile\CertSigner.exe and it will also patch the Template.au3 ( if one is found ), to add the directive, with /NoPopup /NoLogfile ( therefore CertSigner.exe would otherwise write a log file and show a GUI with said log ), but the output is displayed at SciTE's console anyway, so what's the need for more bells and whistles. No need. Unless you run it in self standing mode, by dropping a file to it. Then you do want to have a feedback. In such case, a log is written and displayed. You may even add a shortcutr to "SendTo", to sign files from explorer. I tested the original code from Windows 2000 to Windows 10 and this compilation in english, spanish, french and korean, to assure uniform looks and functionality under every circumstance that I can think of at this moment. An ini file will be created as you first run CertSigner.exe, for you to edit and create your own self signed certificate. Do add the certificate to the store as trusted root ( otherwise what's the point ), and by doing so, the verification at the end of the signing will pass. Enjoy1 point -
Hi I am trying to make a gui that uses a slide to change pictures and uses internet-read from guinness function. Thanks for your help. Ok found the issue #include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <WinAPIRes.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 229, 165, 2392, 436) $Slider = GUICtrlCreateSlider(32, 128, 150, 29) GUICtrlSetLimit($Slider, 2, 1) GUICtrlSetData($Slider, 1) GUICtrlSetBkColor($Slider, 0x0099FF) GUICtrlSetColor(-1, 0xA6CAF0) $hSlider_Handle = GUICtrlGetHandle(-1) $sFile1 = _GetURLImage("http://www.pendriveapps.com/wp-content/uploads/autoit.jpg ", @TempDir) $sFile2 = _GetURLImage("http://domoticx.com/wp-content/uploads/autoit-logo-200x154.jpg ", @TempDir) $Hpic1 = GUICtrlCreatePic($sFile1, 56, 8, 108, 108, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Slider $a = GUICtrlRead($Slider) If $a = 2 Then GUICtrlDeleteImage($Hpic1) $Hpic2 = GUICtrlCreatePic($sFile2, 56, 8, 108, 108, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) ElseIf $a = 1 Then GUICtrlDeleteImage($hpic2) $Hpic1 = GUICtrlCreatePic($sFile1, 56, 8, 108, 108, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) EndIf EndSwitch WEnd Func _GetURLImage($sURL, $sDirectory = @ScriptDir) ; Author ........: guinness Local $hDownload, $sFile $sFile = StringRegExpReplace($sURL, "^.*/", "") If @error Then Return SetError(1, 0, $sFile) EndIf If StringRight($sDirectory, 1) <> "\" Then $sDirectory = $sDirectory & "\" EndIf $sDirectory = $sDirectory & $sFile If FileExists($sDirectory) Then Return $sDirectory EndIf $hDownload = InetGet($sURL, $sDirectory, 17, 1) While InetGetInfo($hDownload, 2) = 0 If InetGetInfo($hDownload, 4) <> 0 Then InetClose($hDownload) Return SetError(1, 0, $sDirectory) EndIf Sleep(105) WEnd InetClose($hDownload) Return $sDirectory EndFunc ;==>_GetURLImage Func GUICtrlDeleteImage($iCtrlID) ; Author ........: guinness Local Const $STM_SETIMAGE = 0x0172 Local $aSetImage = 0, _ $bReturn = True, _ $iMsg = 0 Switch _WinAPI_GetClassName($iCtrlID) Case 'Button' ; button, checkbox, groupbox, radiobutton. Local $aButton = [$IMAGE_BITMAP, $IMAGE_ICON] $aSetImage = $aButton $aButton = 0 Case 'Static' ; icon, label, picture. Local $aStatic = [$IMAGE_BITMAP, $IMAGE_CURSOR, $IMAGE_ICON] $aSetImage = $aStatic $aStatic = 0 $iMsg = $STM_SETIMAGE Case Else $bReturn = False EndSwitch If $bReturn Then $bReturn = False Local $hImage = 0 For $i = 0 To UBound($aSetImage) - 1 $hImage = GUICtrlSendMsg($iCtrlID, $iMsg, $aSetImage[$i], 0) If $hImage <> 0 Then Switch $aSetImage[$i] Case $IMAGE_BITMAP $bReturn = _WinAPI_DeleteObject($hImage) Case $IMAGE_CURSOR $bReturn = _WinAPI_DeleteObject($hImage) If Not $bReturn Then $bReturn = _WinAPI_DestroyCursor($hImage) > 0 EndIf Case $IMAGE_ICON $bReturn = _WinAPI_DeleteObject($hImage) If Not $bReturn Then $bReturn = _WinAPI_DestroyIcon($hImage) > 0 EndIf EndSwitch ExitLoop EndIf Next If Not $bReturn Then $bReturn = GUICtrlSetImage($iCtrlID, 'shell32.dll', -50) > 0 EndIf EndIf Return $bReturn EndFunc ;==>GUICtrlDeleteImage1 point
-
In case Andreik's link ever fails, here's the 'official' link.1 point
-
When you create the GUI add $WS_SIZEBOX to the style. For setting the max/min use this GUIRegisterMsg($WM_GETMINMAXINFO, 'WM_GETMINMAXINFO') with this function Func WM_GETMINMAXINFO($hWnd, $MsgID, $wParam, $lParam) #forceref $MsgID, $wParam If $hWnd = $nowPlayingGUI Then; the main GUI-limited Local $minmaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) DllStructSetData($minmaxinfo, 7, 300); min width DllStructSetData($minmaxinfo, 8, 200); min height EndIf Return 0 EndFunc1 point