Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/29/2016 in all areas

  1. The brilliant thing about the help file is it's actually a community project, albeit a couple of MVPs have access to the editing the files. Besides this, user input is invaluable because the more we tailor the help file the less people will be asking everyday common questions. So this is why I've decided to tackle the FAQ, but instead of adding questions I think are common, I thought I would ask you, what questions should be added? What questions do you see popping up on a regular basis? Have you asked a common question in the past and felt it would have been beneficial in the help file? Please structure your post as the following: [Question]: Required question. [Answer]: Required answer. [Optional Example]: Optional, but might be useful. Note: I was undecided whether to post this in Chat or here, but felt this would gain more attention if posted here.
    1 point
  2. Some Graphical Examples using GDI+ Vol. II build 2016-05-07 (33 examples) This is the continuation of "Some Graphical Examples using GDI+ Vol. I" with currently 33 examples in "snippet style". For downloads and screenshots just visit the download section. All examples should properly run on Win7+ operating systems / tested on AutoIt v3.3.14.2! More examples will follow from time to time. Thanks to Eukalyptus! Please report any issues / feel free to post any comment. Have fun.
    1 point
  3. ; #FUNCTION# ==================================================================================================================== ; Name ..........: _html2pdf ; Description ...: Convert HTML file to PDF file with htm2pdf.exe by Synopse ; Syntax ........: _html2pdf($sHTML_FileFullPath[, $sPDF_FileFullPath = Default[, $bDeleteHTML = False]]) ; Parameters ....: $sHTML_FileFullPath - a string value. HTML file full path. ; $sPDF_FileFullPath - [optional] a string value. Default value is Default -> $sHTML_FileFullPath & '.pdf' ; $bDeleteHTML - [optional] a boolean value. Default is False. ; Return values .: $sPDF_FileFullPath or set @error to 1 ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://blog.synopse.info/post/2010/07/14/htm2pdf-free-tool ; Example .......: No ; =============================================================================================================================== Func _html2pdf($sHTML_FileFullPath, $sPDF_FileFullPath = Default, $bDeleteHTML = False) If $sPDF_FileFullPath = Default Then $sPDF_FileFullPath = $sHTML_FileFullPath & '.pdf' Local $sINI_FileFullPath = @ScriptDir & '\htm2pdf.ini' IniWrite($sINI_FileFullPath, 'Settings', 'HTML', $sHTML_FileFullPath) IniWrite($sINI_FileFullPath, 'Settings', 'PDF', $sPDF_FileFullPath) IniWrite($sINI_FileFullPath, 'Settings', 'OpenAfterSave', '0') IniWrite($sINI_FileFullPath, 'Settings', 'ScaleToFit', '1') IniWrite($sINI_FileFullPath, 'Settings', 'Orientation', 0) IniWrite($sINI_FileFullPath, 'Settings', 'PaperSize', 0) IniWrite($sINI_FileFullPath, 'Margins', 'Left', 2) IniWrite($sINI_FileFullPath, 'Margins', 'Top', 1) IniWrite($sINI_FileFullPath, 'Margins', 'Right', 1) IniWrite($sINI_FileFullPath, 'Margins', 'Bottom', 1) ShellExecuteWait(@ScriptDir & '\htm2pdf.exe', '/silent', @ScriptDir) If Not FileExists($sPDF_FileFullPath) Then Return SetError(1, 0, '') Else If $bDeleteHTML Then FileDelete($sHTML_FileFullPath) Return $sPDF_FileFullPath EndIf EndFunc ;==>_html2pdf http://blog.synopse.info/post/2010/07/14/htm2pdf-free-tool#main http://blog.synopse.info/post/2010/07/14/htm2pdf-free-tool http://synopse.info/forum/viewtopic.php?pid=187 http://synopse.info/files/pdf/htm2pdf.zip mLipok
    1 point
  4. A fully detailed "What to know" for Maps101 can be found here I'm here to explain my opinion over maps, i like it so much, give to autoit someting of object orientet... I want to talk of the use i got from maps, specificlly Multi-Dimensional Maps Maps101 usage Global $mObj[] ; can be stored Global here, local inside a function or somiething like that $mObj.instance=1 ;the mObjct . instance was declared to be 1 or true msgbox(0,"",$mObj.instance) really easy, not? now something more hard i was impressed to the semplicity of maps give me to realize an artificial intelligence, a sort of little game of life (not konoweys) The maps can give you a multi-Dimensional tipe of array it's noting that $array[][] couldn't do but let me explain how much it's easyer thats a really simple algorithm that improve autoit object oriented like programming in this example i use some java syntax like to obtain someting like string.len or character.getPos.x else character.getPos.y ; i have a gridMap ;in one or more slot of the gridMap ;i have an individue, an essence, an object Global $aGridMap[10][10] ; declaring the grid map ; the gridMap goes from a range value of 0~9 ;now i want to instance some individue, essence or object ;on a grid of 10 x 10 i can declare 100 dinstincte object ;but i need to store it first in a multidimensional-Array Global $instance = 2 ;number of object that i want to initialize Global $aWorldArray[$instance][4] $aWorldArray[0][0] = 2 ;at this point i select a pos for the obj in the grid This is the x value $aWorldArray[0][1] = 4 ;this is the y vaue $aWorldArray[0][2] = 0x00FF00 ;this is the color of the element $aWorldArray[0][3] = "fruit" ;this is the type of the element $aWorldArray[1][0] = 5 ;same as up $aWorldArray[1][1] = 3 $aWorldArray[1][2] = 0xFF0000 $aWorldArray[1][3] = "animal" ;this dosen't look great, i really dosn't apprecciate this approach ;now i want to realize a sort of structure where i can modify the parameters how i want. ;_arrayToMaps transform the multidimensional array from world to a specified individue ;$array is the $aWorldArray, ;~ the $n is the instance, the element we want to grab Func _ArrayToMaps(ByRef $array, $n = 0);the byref grab the entire array Local $mIndividue[] ;preparing for maps Local $mPos[] ;creating the multidimension map for .x .y pos $mPos.x = $array[$n][0] $mPos.y = $array[$n][1] $mIndividue.getPos = $mPos ; with this trick someting magic appens, the .x .y was attached to the getPos node root $mIndividue.n = $n ;remember his own position into the world obj list $mIndividue.type = $array[$n][3] $mIndividue.color = $array[$n][2] ;we have now a single Individue from an array wolrd of objct ;but we want do more hazard thing :P let's destroy the compiler, (my brain maybe) ;we want the $mIndividue Maps store in its own node an entire multidimensional array $mIndividue.array = 0 ;a blank array node to the individue Local $aMultiDim[2][2] ; a structure that contain two names at [0][0] and [0][1] and two surname at [1][0] and [1][1] $aMultiDim[0][0] = "Mario" $aMultiDim[0][0] = "Mary" $aMultiDim[1][0] = "noodles" $aMultiDim[1][1] = "nuggets" ;let's add the multy dim array to $mIndividue.array $mIndividue.array = $aMultiDim ;now you have a complete $mIndividue that contain for example the name... ;How to use $mIndividue.array[1][0] to get "noodles" as a string! Absolutely crazy :D i've never seen or use something like that ;i really dosn't think that a map's really need a multidim array but that make the things more easyer ;i want now to operate with the individue structure, then return the map Return $mIndividue EndFunc ;==>_ArrayToMaps ;i make a function that operate on an individue obj type Func _changeSometing(ByRef $mIndividue) ;i want to move my object to an other position then $mIndividue.getPos.x = 6 $mIndividue.getPos.y = 3 ;i want to change the color then $mIndividue.color = 0x0000FF ;for blue, an hex RGB value, 0x 00 00 ff, on int it was R000 G000 B255 ;and i want also read some data from the array node Local $string = '' ;make a blanck string that contain the array info For $i = 0 To 1 For $u = 0 To 1 $string &= $mIndividue.array[$i][$u] & @CRLF ;usage of multidim array into the array map Next Next ;then output the array MsgBox(0, "lets Read the name!", $string) ;$string is only the concatenation of $mIndividue.array Return $mIndividue ;return the entire map! EndFunc ;==>_changeSometing ;i make now a function that rewrite back the individual information to a multidimensional array World Func _MapsToArray(ByRef $mIndividue) ;this time we don't need the position of the object in the array, because it was store in individue.n Local $n $n = $mIndividue.n ;get back it's own stacks $aWorldArray[$n][0] = $mIndividue.getPos.x ;at this point i select a pos for the obj in the grid This is the x value $aWorldArray[$n][1] = $mIndividue.getPos.y ;this is the y value $aWorldArray[$n][2] = $mIndividue.color $aWorldArray[$n][3] = $mIndividue.type ;useless because the $mIndividue.type wasn't changed but that eventually restore the value onto the world array obj ;~ $aWorldArray is stored globally then i don't need to return a parameters EndFunc ;==>_MapsToArray Func Main();i like to write a main function like c ;we have the entire project now let's concatenate ;~ i want my world array of obj goes to an single individue map then $aWorld = $aWorldArray ; i get the array parameter $mSingleObjectFromWorld = _ArrayToMaps($aWorld) ;given array tipe, return maps type MsgBox(0, "old Pos", $mSingleObjectFromWorld.getPos.x & @CRLF & $mSingleObjectFromWorld.getPos.y );read the pos $mSingleObjectFromWorld=_changeSometing($mSingleObjectFromWorld);lets the function modify someting MsgBox(0, "new Pos", _ $mSingleObjectFromWorld.getPos.x & @CRLF _ & $mSingleObjectFromWorld.getPos.y ) ;see what's changed ;now restore back the data to a single multidimensional array from each individue _MapsToArray($mSingleObjectFromWorld) ; thats restore the $mIndividue changes from single obj to the world multidim array of elements ;$mSingleObjectFromWorld know is index in the array, because it was stored as $mSingleObjectFromWorld.n where n is the array index EndFunc ;==>_Main Call("Main") easy explanation of possible uses one examples that took me into java syntax Func _simpleString($string);transofrm a string to someting like Java Local $mapString[] $mapString.string = $string $mapString.len = StringLen($string) Local $chAsci $chAsci = StringToASCIIArray($string) For $i = 0 To UBound($chAsci) - 1 $chAsci[$i] = Chr($chAsci[$i]) Next $mapString.char = $chAsci Return $mapString EndFunc ;==>_simpleString ;~-----the script starts here---- $strin = 'ciao' $mString = _simpleString($strin) MsgBox(0,"the string",$mString.string) MsgBox(0, "the lenght of the string", $mString.len) MsgBox(0, "the first character of the string", $mString.char[0]) MsgBox(0, "the last character of the string", $mString.char[$mString.len - 1]) isn't this like a well organizated structure?! i hope this was helpfull Kiss!
    1 point
  5. Maximized Windows in Windows 10 usually (for me) don't show tooltips or hints. For a short time following a WIndows update this was fixed on my laptop but after another day, and maybe another update, the problem returned, so I don't understand what the conditions are. The script below checks for maximized windows and sets their size to a few pixels less than the screen size and this brings back tooltips. I have found another way to fix the problem which might help some people. There are several programs I use regularly and the tooltips are important. On the programs I compile the tooltips help my users if they are not familiar with using the programs. If I set the maximum window size to be greater than the screen size ( @DesktopHeight/@Desktopwidth) then when maximized it still fits the screen ok but the tooltips still work. This can be done in AUtoIt with GUIRegisterMsg($WM_GETMINMAXINFO, "MY_WM_GETMINMAXINFO")---- (search for examples) In Delphi it can be done with Form.Constraints. I don't know about other languages. For apps where the maximum size can't be controlled the script below could help someone; it helps me at least. Const $SPI_SETWORKAREA = 47, $SPI_GETWORKAREA = 48, $SPIF_SENDCHANGE = 11 $StartRect = DllStructCreate("int[4]") $PStartRect = DllStructGetPtr($StartRect) $res = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", $PStartRect, "int", 0) $maxwid = DllStructGetData($StartRect, 1, 3) - DllStructGetData($StartRect, 1, 1) $maxht = DllStructGetData($StartRect, 1, 4) - DllStructGetData($StartRect, 1, 2) While 1 $aList = WinList() $res = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", $PStartRect, "int", 0) $maxwid = DllStructGetData($StartRect, 1, 3) - DllStructGetData($StartRect, 1, 1) $maxht = DllStructGetData($StartRect, 1, 4) - DllStructGetData($StartRect, 1, 2) For $i = 1 To $aList[0][0] If $aList[$i][0] <> 'Program Manager' Then $ws = WinGetPos($aList[$i][1]) if isarray($ws) then;for some reason it isn't always If $aList[$i][0] <> "" And $ws[2] > $maxwid And $ws[3] > $maxht Then WinSetState($aList[$i][1], '', @SW_RESTORE);because changing the size leaves it as maximised as far as Windows is concerned! WinMove($aList[$i][1], '', $ws[0],$ws[1], $maxwid, $maxht) Endif EndIf EndIf Next Sleep(5000) WEnd 25th January 2016. WIndows 10 had a major update overnight on my PC. Now the problem with missing tooltips has gone. I din't know Microsoft studied these forums so carefully. So this means this script is no longer needed by me or anyone else. 24 Jan 2016 Edit again after Argumentum pointed out more than one monitor not allowed for. Not certain this is still correct but will test it with another monitor during next few days. 24th Jan 2016 Improved to use working area of desktop because the Taskbar and other apps can use up some of the desktop, so a maximised window is not necessarily to desktop size. (I tried testing for @Maximized but it failed, and I didn't spend any time worying about why though it would be better.)
    1 point
  6. Jos

    debugger

    Much clearer Seriously, I do understand your native language isn't English, but it is totally unclear what you want from us. On top of that It feels this all has to do with Game hacks/mods ... right? Jos
    1 point
  7. Melba23

    debugger

    kyosha, Could you be any more cryptic if you tried? What is this "bot" that you wish to debug? Is it a script written in AutoIt? Or is it a complied AutoIt executable? How do you know it downloads "something"? What sort of "something"? Please give us some more information. M23
    1 point
  8. Melba23

    Trainer Hotkey

    valkon_zero, Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23
    1 point
  9. The datatype is converted to an integer before it is used as the index using the normal conversion rules. So nothing will change there.
    1 point
  10. It's the closest thing to an IDE for AutoIt that we have. Much more than just the basic Scite Editor. Once you've got it installed, and you've ran ISN to set everything up first, there's a config.ini under D:\Users\Your Username\My Documents\ISN AutoIt Studio\Data\ You can put those values in the post in that config file. You can also edit more settings by going to File -> Settings (Under Script Editor is the colors) As for the Macro, to change the color for the caret. Project -> Macros -> New Macro. Click the + button next to functions and make the trigger Open File. Click the + button next to Details and select Execute Command. Hit OK and use this command SendMessage($SCE_EDITOR[_GUICtrlTab_GetCurFocus($hTab)], $SCI_SETCARETFORE, 0xFFFFFF, 0) You can change 0xFFFFF to whatever color you want the caret to be. Save your macro and re-open your script to update the caret. Until the updated ISN comes up you'll have to add the macro to each project, so just save the macro and import it when you start a new project.
    1 point
  11. Queener, I would do something like this: #include <GUIConstantsEx.au3> Global $aData[10] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] $hGUI = GUICreate("Test", 500, 500) GUIStartGroup() $cRad_1 = GUICtrlCreateRadio(" Items 1-4", 10, 10, 200, 20) $cRad_2 = GUICtrlCreateRadio(" Items 5-9", 10, 50, 200, 20) $cCombo = GUICtrlCreateCombo("", 10, 100, 200, 20) GUISetState() While 1 Local $iStart = -1, $iEnd = -1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cRad_1, $cRad_2 $sData = "" If GUICtrlRead($cRad_1) = $GUI_CHECKED Then $iStart = 0 $iEnd = 4 Else $iStart = 5 $iEnd = 9 EndIf For $i = $iStart To $iEnd $sData &= "|" & $aData[$i] Next GUICtrlSetData($cCombo, $sData) EndSwitch WEnd Please ask if you have any questions. M23
    1 point
  12. forgot your space before the _ in this line ["ClipEdit\Display", "StillImageSaveFolderName", "C:\Temp"],_
    1 point
  13. This line: ["ClipEdit\Display", "StillImageSaveFolderName", "C:\Temp"],_ Is missing the space after the comma and before the line continuation character ["ClipEdit\Display", "StillImageSaveFolderName", "C:\Temp"], _ Subtle difference but important.
    1 point
  14. #include <FileConstants.au3> #include <MsgBoxConstants.au3> Global Const $ADO_adSchemaTables = 20 _Example() Func _Example() Local $oConnection = ObjCreate('ADODB.Connection') $oConnection.Open(_ADO_XLS_ConnectionString()) Local $oTablesSchema = $oConnection.OpenSchema($ADO_adSchemaTables) While Not $oTablesSchema.EOF ConsoleWrite("! " & $oTablesSchema.Fields("TABLE_NAME").Value & @CRLF) $oTablesSchema.MoveNext WEnd EndFunc Func _ADO_XLS_ConnectionString($sXLS_FileFullPath = Default, $sProvider = Default, $sXLS_Version = Default, $HDR = Default, $IMEX = 0) If $sXLS_FileFullPath = Default Then $sXLS_FileFullPath = FileOpenDialog('Select XLS File', @ScriptDir, 'XLS file (*.xls)', $FD_FILEMUSTEXIST + $FD_PATHMUSTEXIST) EndIf If $sProvider = Default Then $sProvider = 'Microsoft.Jet.OLEDB.4.0' EndIf If $sXLS_Version = Default Then $sXLS_Version = 'Excel 8.0' EndIf If $HDR = Default Or $HDR = True Or $HDR = 'yes' Then $HDR = 'yes' Else $HDR = 'no' EndIf Local $sXLS_ConnectionString = _ 'Provider=' & $sProvider & ';' & _ 'Data Source="' & $sXLS_FileFullPath & '";' & _ 'Extended Properties="' & $sXLS_Version & ';HDR=' & $HDR & ';IMEX=' & $IMEX & '";' Return $sXLS_ConnectionString EndFunc ;==>_ADO_XLS_ConnectionString
    1 point
  15. CodeTinkerer, Thanks for the explanation - looking forward to your final script. M23
    1 point
×
×
  • Create New...