Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/27/2018 in all areas

  1. Melba23

    Window Style Tool

    boomingranny, My pleasure, as always. M23
    2 points
  2. Not exactly all the same. When/if (*UCP) is used, [0-9] does exactly what it means (ASCII 0 to ASCII 9) while both other forms include codepoins that have the Nd (Numeric Decimal) properties. And that is a number of characters: from old Unicode v5.1: Codepoint Glyph CharacterName U+00030 '0' DIGIT ZERO U+00660 '٠' ARABIC-INDIC DIGIT ZERO U+006F0 '۰' EXTENDED ARABIC-INDIC DIGIT ZERO U+007C0 '߀' NKO DIGIT ZERO U+00966 '०' DEVANAGARI DIGIT ZERO U+009E6 '০' BENGALI DIGIT ZERO U+00A66 '੦' GURMUKHI DIGIT ZERO U+00AE6 '૦' GUJARATI DIGIT ZERO U+00B66 '୦' ORIYA DIGIT ZERO U+00BE6 '௦' TAMIL DIGIT ZERO U+00C66 '౦' TELUGU DIGIT ZERO U+00CE6 '೦' KANNADA DIGIT ZERO U+00D66 '൦' MALAYALAM DIGIT ZERO U+00E50 '๐' THAI DIGIT ZERO U+00ED0 '໐' LAO DIGIT ZERO U+00F20 '༠' TIBETAN DIGIT ZERO U+01040 '၀' MYANMAR DIGIT ZERO U+01090 '႐' MYANMAR SHAN DIGIT ZERO U+017E0 '០' KHMER DIGIT ZERO U+01810 '᠐' MONGOLIAN DIGIT ZERO U+01946 '᥆' LIMBU DIGIT ZERO U+019D0 '᧐' NEW TAI LUE DIGIT ZERO U+01B50 '᭐' BALINESE DIGIT ZERO U+01BB0 '᮰' SUNDANESE DIGIT ZERO U+01C40 '᱀' LEPCHA DIGIT ZERO U+01C50 '᱐' OL CHIKI DIGIT ZERO U+024EA '⓪' CIRCLED DIGIT ZERO U+024FF '⓿' NEGATIVE CIRCLED DIGIT ZERO U+0A620 '꘠' VAI DIGIT ZERO U+0A8D0 '꣐' SAURASHTRA DIGIT ZERO U+0A900 '꤀' KAYAH LI DIGIT ZERO U+0AA50 '꩐' CHAM DIGIT ZERO U+0FF10 '0' FULLWIDTH DIGIT ZERO U+104A0 '𐒠' OSMANYA DIGIT ZERO U+1D7CE '𝟎' MATHEMATICAL BOLD DIGIT ZERO U+1D7D8 '𝟘' MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO U+1D7E2 '𝟢' MATHEMATICAL SANS-SERIF DIGIT ZERO U+1D7EC '𝟬' MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO U+1D7F6 '𝟶' MATHEMATICAL MONOSPACE DIGIT ZERO U+E0030 '󠀰' TAG DIGIT ZERO It's a pity that most glyphs don't show up correctly. That's the extra price you pay for being born in a non-latin script area.
    2 points
  3. ISI360

    ISN AutoIt Studio

    Note: This is the continuation thread from the original one of 2012. The old one growed over 50 pages...so to make the overview better i created a new main thread for the ISN AutoIt Studio. You can find the old original thread here. The ISN AutoIt Studio is a complete IDE made with AutoIt, for AutoIt! It includes a GUI designer, a code editor (with syntax highlighting, auto complete & intelisense), a file viewer, a backup system and a lot more features!! Here are some screenshots: Here are some higlights: Easy to create/manage/public your AutoIt projects! Integrated GUI-Editor (ISN Form Studio 2) Integrated file & projectmanager Auto backupfunction for your Projects Extendable with plugins! Available in several languages Trophies Syntax highlighting /Autocomplete / Intelisense Macros Changelog manager for your project Detailed overview of the project (total working hours, total size...) Am integrated To-Do List for your project Open Source (You can download the source code from my website) And much much more!!! -> -> Click here to download ISN AutoIt Studio <- <- Here is the link to the german autoit forum where I posted ISN AutoIt Studio the first time: Link For more information visit my Homepage: https://www.isnetwork.at So, have fun with the ISN AutoIt Studio! And feel free to post your feedback, bugreports or ideas for this project here in this thread!
    1 point
  4. R0G

    Digital Sign Tool

    Digital Sign Tool V1.6 Features: Digitally sign: (.exe) (.cab) (.cat) (.ocx) (.dll) (.stl) Metro style GUI thanks @BBs19 Error logging Multi file support Instructions: You must have your (.pfx) certificate imported to the "Current User\Personal\Certificates" store Your certificate must be exportable Select your digital certificate from the drop down menu Click browse to add your files to sign Click sign For more information please visit: https://www.autoitscript.com/forum/topic/149137-sign-your-exe-with-a-digital-signature-signtoolexe/#comment-1061738 https://msdn.microsoft.com/en-us/library/bfsktky3(vs.100).aspx?f=255&MSPPError=-2147217396 Changelog: V1.6 1/8/2021 - Updated broken Signing URL - Added option to change signing URL in settings - Other Bug Fixes Download: Digital Sign Tool V1.6.zip Digital Sign Tool V0.5.zip
    1 point
  5. I know you proposed this and think I have answered that too. Simply use Ctrl+q for the whole block so it is prefixed by ";~" and those lines will not be moved anymore. This is a SciTE internals thing and is not something I will be looking at, but it only happens when your cursor in not at the start of the line but in front of While when you press Ctrf+Shift+q. So just ensure your cursor is at the start of the line. Jos
    1 point
  6. I needed to do a backup program that meets my needs and I want to share it with you. #RequireAdmin #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=.\Bk.ico #AutoIt3Wrapper_Compression=0 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_Comment=Função: Application to backup #AutoIt3Wrapper_Res_Description=Autoit3 3.3.9.4 #AutoIt3Wrapper_Res_Fileversion=1.1.10.18 #AutoIt3Wrapper_Res_LegalCopyright=Made by Belini #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ------------------------------------------------- Title: Backup Personal Objective: Back up of the files and folders Author: Belini (Brazil) Autoit Version: 3.3.9.4 Version: 1.0.10.18 Forum: http://www.autoitbrasil.com/forum #ce ------------------------------------------------- #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include "_UskinLibrary.au3" #include <GuiListView.au3> #include "Skin_03.au3" #include <File.au3> Global $iFix_Col = 1, $Dir_backup, $Input, $Listv, $Listv_Files, $Updated = 0, $Sustained = 0 Global $nMsg, $proceed = 1, $item_num, $But[8], $item_text[4], $Check, $lab[3] _Arq_ini() _Uskin_LoadDLL() _USkin_Init(_Skin_03(True)) _Gui_backup() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $But[1] _Add_Line() Case $But[2] _Del_line() Case $But[3] _Opt_Dir() Case $But[4] _Opt_Backup() Case $But[5] _Dir_Backup() Case $But[6] $proceed = 0 Case $But[7] _Start_backup() Case $Check _Opt_Finalize() EndSwitch WEnd Func _Add_Line() Local $dir = FileSelectFolder("Searching for folder.", "") If IniRead(@ScriptDir & "\Config.ini", "Folders", $dir, "") = "" Then GUICtrlCreateListViewItem($dir & "|Include Subfolders" & "|Yes", $Listv) IniWrite(@ScriptDir & "\Config.ini", "Folders", $dir, "|Include Subfolders" & "|Yes") Else MsgBox(4096, "", "This directory has already been chosen!", 3) EndIf EndFunc ;==>_Add_Line Func _Arq_ini() If Not FileExists(@ScriptDir & "\Config.ini") Then _ FileWrite(@ScriptDir & "\Config.ini", "[BACKUP]" & @CRLF & "address= " & @CRLF & @CRLF & "[TURN OFF]" & @CRLF & "option=0" & @CRLF & @CRLF & "[FOLDERS]") EndFunc ;==>_Arq_ini Func _Backup_Files($path = "") Local $searh_files, $i $searh_files = _FileListToArray($path, "*.*", 1) If Not @error Then For $i = 1 To $searh_files[0] If GUIGetMsg() = $But[6] Then $proceed = 0 If $proceed = 0 Then ExitLoop _Compare_files($path & "\" & $searh_files[$i]) Next EndIf EndFunc ;==>_Backup_Files Func _Backup_Full($path = "", $counter = 0) $counter = 0 $path &= '\' Local $file, $searh_files $searh_files = FileFindFirstFile($path & '*') If $searh_files = -1 Then Return '' While 1 If GUIGetMsg() = $But[6] Then $proceed = 0 $file = FileFindNextFile($searh_files) If @error Or $proceed = 0 Then ExitLoop If @extended Then If $counter >= 10 Then ContinueLoop _Backup_Full($path & $file, $counter + 1) Else _Compare_files($path & $file) EndIf WEnd FileClose($searh_files) EndFunc ;==>_Backup_Full Func _Compare_files($file = "") Local $File_backup, $item, $folder $item = StringTrimLeft($file, StringInStr($file, "\", 1, -1)) $folder = StringTrimLeft($file, StringInStr($file, "\", 1, -2)) $folder = StringMid($folder, 1, StringInStr($folder, "\", 1, -1) -1 ) $File_backup = StringReplace($file, StringMid($file, 1, 2), $Dir_backup, 0, 2) $file = FileGetShortName($file) $File_backup = FileGetShortName($File_backup) _GUICtrlListView_SetItemText($Listv, 0, $folder, 2) _GUICtrlListView_SetItemText($Listv, 0, $item, 1) If FileGetTime($file, 0, 1) > FileGetTime($File_backup, 0, 1) Then $Updated += 1 FileCopy($file, $File_backup, 9) GUICtrlSetData($lab[2], "Updated: " & $Updated) Else $Sustained += 1 GUICtrlSetData($lab[1], "Sustained: " & $Sustained) EndIf EndFunc ;==>_Compare_files Func _Del_line() $item_num = _GUICtrlListView_GetSelectedIndices(GUICtrlGetHandle($Listv)) $item_text[1] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num)) _GUICtrlListView_DeleteItemsSelected(GUICtrlGetHandle($Listv)) IniDelete(@ScriptDir & "\Config.ini", "Folders", $item_text[1]) EndFunc ;==>_Del_line Func _Dir_Backup() $Dir_backup = FileSelectFolder("Searching for folder.", "", 1) ;GUICtrlSetState($Input, $GUI_FOCUS) GUICtrlSetData($Input, $Dir_backup) IniWrite(@ScriptDir & "\Config.ini", "BACKUP", "address", $Dir_backup) EndFunc ;==>_Dir_Backup Func _Gui_backup() GUICreate("Backup Personal - Made by Belini", 660, 679, -1, -1) GUICtrlCreateGroup("Directory for backup ", 352, 11, 290, 69) $But[1] = GUICtrlCreateButton("Include address", 15, 16, 140, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $But[2] = GUICtrlCreateButton("Delete address", 15, 56, 140, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $But[3] = GUICtrlCreateButton("Archives / Subfolders", 170, 16, 170, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $But[4] = GUICtrlCreateButton("Mark / Unmark", 170, 56, 170, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $But[5] = GUICtrlCreateButton("Search", 553, 36, 75, 25) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $But[6] = GUICtrlCreateButton("Cancel", 514, 631, 130, 33) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $But[7] = GUICtrlCreateButton("Start", 390, 631, 110, 33) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $Input = GUICtrlCreateInput(IniRead(@ScriptDir & "\Config.ini", "BACKUP", "address", ""), 368, 38, 183, 21) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Check = GUICtrlCreateCheckbox("Turn off the computer when the task is finished.", 15, 647, 352, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $lab[1] = GUICtrlCreateLabel("Sustained: 0", 32, 623, 175, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $lab[2] = GUICtrlCreateLabel("Updated: 0", 210, 623, 175, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Listv = GUICtrlCreateListView("Folder Address|List Files|Make Backup", 16, 96, 627, 520, _ BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) _GUICtrlListView_SetColumnWidth($Listv, 0, 395) _GUICtrlListView_SetColumnWidth($Listv, 1, 120) _GUICtrlListView_SetColumnWidth($Listv, 2, 105) _GUICtrlListView_JustifyColumn($Listv, 1, 2) _GUICtrlListView_JustifyColumn($Listv, 2, 2) GUISetState(@SW_SHOW) Local $aArray = IniReadSection(@ScriptDir & "\Config.ini", "Folders") _ArraySort($aArray) If Not @error Then For $i = 1 To $aArray[0][0] If FileExists($aArray[$i][0]) Then GUICtrlCreateListViewItem(StringReplace($aArray[$i][0] & $aArray[$i][1], "=|", "|"), $Listv) Else GUICtrlCreateListViewItem($aArray[$i][0] & "|Inexistent Folder|Not", $Listv) EndIf Next EndIf If IniRead(@ScriptDir & "\Config.ini", "TURN OFF", "option", "1") = "1" Then GUICtrlSetState($Check, $GUI_CHECKED) EndFunc ;==>_Gui_backup Func _Opt_Dir() $item_num = _GUICtrlListView_GetSelectedIndices(GUICtrlGetHandle($Listv)) $item_text[1] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num), 1) $item_text[2] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num), 2) Switch $item_text[1] Case "Directory Only" _GUICtrlListView_SetItemText($Listv, $item_num, "Include Subfolders", 1) IniWrite(@ScriptDir & "\Config.ini", "Folders", _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num)), "|Include Subfolders|" & $item_text[2]) Case "Include Subfolders" _GUICtrlListView_SetItemText($Listv, $item_num, "Directory Only", 1) IniWrite(@ScriptDir & "\Config.ini", "Folders", _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num)), "|Directory Only|" & $item_text[2]) Case "Inexistent Folder" MsgBox(4096, "", "Directory does not exist!", 3) EndSwitch EndFunc ;==>_Opt_Dir Func _Opt_Backup() $item_num = _GUICtrlListView_GetSelectedIndices(GUICtrlGetHandle($Listv)) $item_text[1] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num), 1) $item_text[2] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num), 2) If $item_text[1] <> "Inexistent Folder" Then Switch $item_text[2] Case "Yes" _GUICtrlListView_SetItemText($Listv, $item_num, "Not", 2) IniWrite(@ScriptDir & "\Config.ini", "Folders", _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num)), "|" & $item_text[1] & "|Not") Case "Not" _GUICtrlListView_SetItemText($Listv, $item_num, "Yes", 2) IniWrite(@ScriptDir & "\Config.ini", "Folders", _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), Number($item_num)), "|" & $item_text[1] & "|Yes") EndSwitch Else MsgBox(4096, "", "Directory does not exist!", 3) EndIf EndFunc ;==>_Opt_Backup Func _Opt_Finalize() If GUICtrlRead($Check) = 1 Then IniWrite(@ScriptDir & "\Config.ini", "TURN OFF", "option", "1") Else IniWrite(@ScriptDir & "\Config.ini", "TURN OFF", "option", "0") EndIf EndFunc ;==>_Opt_Finalize Func _Start_backup() Local $itens = _GUICtrlListView_GetItemCount($Listv) If $itens > 0 Then $Dir_backup = GUICtrlRead($Input) If FileExists($Dir_backup) Then For $i = 1 To $itens If $proceed = 0 Then ExitLoop $item_text[1] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), 0, 0) $item_text[2] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), 0, 1) $item_text[3] = _GUICtrlListView_GetItemText(GUICtrlGetHandle($Listv), 0, 2) If $item_text[2] <> "Inexistent Folder" And $item_text[3] = "Yes" Then If $item_text[2] = "Include Subfolders" Then _Backup_Full($item_text[1], 0) Else _Backup_Files($item_text[1]) EndIf EndIf If $proceed = 1 Then _GUICtrlListView_DeleteItem($Listv, 0) Next If $proceed = 1 Then If GUICtrlRead($Check) = 1 Then Shutdown(1) Else GUICtrlSetState($Listv_Files, $GUI_HIDE) MsgBox(4096, "", "Task Completed!") Exit EndIf Else $proceed = 1 _GUICtrlListView_SetItemText($Listv, 0, $item_text[2], 1) _GUICtrlListView_SetItemText($Listv, 0, $item_text[3], 2) EndIf Else MsgBox(4096, "", "Backup directory does not exist!", 3) EndIf EndIf EndFunc ;==>_Start_backup Download full: https://mega.nz/#!5JEylSoB!AvebLVC9bFq_8a33MA2LzaRra6ZEgbYKH5MGcDS8khE
    1 point
  7. @oemript Inspect that element to see if it has some id or class, in order to manage with _IE* functions
    1 point
  8. mikell

    Three letter increment

    An easy way could be to use some brute force (as below) to first build your own array, store it in a txt file, then use FileReadToArray when needed and increment using the array index $Form1 = GUICreate("Form1", 150, 310, 200, 100) $List = GUICtrlCreateList("", 20, 20, 110, 250) $label = GUICtrlCreateLabel("Loading ...", 20, 280, 110, 20) GUISetState() $str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Global $text = StringSplit($str, "", 3), $n = 0, $long = 3 _Go(0,"") GUICtrlSetData($label, $n & " solutions") While GUIGetMsg()<>-3 Wend Func _Go($temp, $string) For $i = 0 to UBound($text)-1 If $temp = $long-1 Then GUICtrlSetData($List, $string & $text[$i] & "|") $n += 1 EndIf If $temp < $long-1 Then _Go($temp+1, $string & $text[$i] ) EndIf Next EndFunc
    1 point
  9. I apologize for my too early generalization
    1 point
  10. Device Manager doesn't even open on my pc (Win 10) when I run this script. I suspect that you may also have issues due to security, if you try running the script with #requireadmin at the top does it work? If so then security is your issue. As careca mentioned, perhaps using WMI to capture the information is a better method. Here is something I started but didn't finish that might get you in the right direction: #include <ScrollBarsConstants.au3> #include <WindowsConstants.au3> #include <process.au3> #include <GuiTreeView.au3> #include <ScreenCapture.au3> #include <GuiScrollBars.au3> #include <WinAPISysWin.au3> #RequireAdmin $outputFile = @DesktopDir&"\controlPanel.jpg" ;not sure why this is required, I believe you can take a screenshot when the monitor is asleep, just not when the computer is asleep ;and if the computer is asleep I believe you would need more than 1 second to wake it up Send(" ") ;sleep - if you insist Sleep ( 1000 ) ;open device manager run("control /name Microsoft.DeviceManager") ;can't interact with this one unless admin ;wait until it is active WinWaitActive("Device Manager") ;get a handle of things $WinHndl = WinGetHandle("Device Manager") $Treeview = ControlGetHandle("Device Manager","","[Class:SysTreeView32]") ;resize WinMove($WinHndl,"",200,0,800,@DesktopHeight-100) ;expand the treeview control _GUICtrlTreeView_Expand($Treeview) MouseMove(300,200) MouseWheel("up",100) Sleep(250) ;take the screenshot of everything in device manager ;credit for the screenshot scrolling code goes to monoscout999 ;Get Edit1 Vertical Scroll Min/Max range and page size. $aScrollRange = _GUIScrollBars_GetScrollRange($Treeview, $SB_VERT) $iPageSize = _GUIScrollBars_GetScrollInfoPage($Treeview, $SB_VERT) $iPages = Round($aScrollRange[1] / $iPageSize) ;get treeview control size $aTreeviewPos = ControlGetPos($WinHndl,"",$Treeview) ;Capture $scrollBarSize = 20 $hDC = _winapi_GetDC($Treeview) $hCDC = _WinAPI_CreateCompatibleDC($hDC) $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $aTreeviewPos[2] - $scrollBarSize , ($aTreeviewPos[3] * ($iPages +1 ))) _WinAPI_SelectObject($hCDC, $hBMP) For $i = 0 to $iPages+1 _WinAPI_BitBlt($hCDC, 0, $aTreeviewPos[3] * $i, $aTreeviewPos[2] - $scrollBarSize , ($aTreeviewPos[3] ), $hDC,0, 0, $SRCCOPY) _WinAPI_PostMessage($Treeview,$WM_VSCROLL,$SB_PAGEDOWN,0) Sleep(250) Next _WinAPI_ReleaseDC($Treeview, $hDC) _WinAPI_DeleteDC($hCDC) _GDIPlus_Startup() $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) _GDIPlus_ImageSaveToFile($hImage, $outputFile) _GDIPlus_Shutdown() _WinAPI_DeleteObject($hBMP) If FileExists($outputFile) Then ShellExecute($outputFile)
    1 point
  11. Dog ate your help file? It's all there
    1 point
  12. Thanks for that Melba23, I knew there was a reason for the bitOr, as when you look at scripts by more experienced folks they typically use it! Updated
    1 point
  13. I have decided to change the default behavior of Tidy not to tidy in Commentblocks and replace the /Skip_Commentblock options replacing it for /Tidy_Commentblock. /Skip_Commentblock will remain to work for backward compatibility, but will be removed from the Tidy.ini example and documentation. An updated tidy.exe is posted in de Dev directory. Jos
    1 point
  14. Looks like you need to click the Full Transactional Log radio button #include <Array.au3> #include <IE.au3> Global $oIE = _IECreate("http://www.aastocks.com/en/stocks/analysis/transaction.aspx?symbol=00005", 1) _IELoadWait($oIE, 5000) Global $otradeLog = _IEGetObjByName($oIE, "charttype") _IEAction($otradeLog, "click") Global $otradeLog1 = _IEGetObjById($oIE, "tradeLog1") Global $atradeLog1 = _IETableWriteToArray($otradeLog1, True) Global $otradeLog2 = _IEGetObjById($oIE, "tradeLog2") Global $atradeLog2 = _IETableWriteToArray($otradeLog2, True) _ArrayDisplay($atradeLog1) _ArrayDisplay($atradeLog2)
    1 point
  15. iamtheky

    Three letter increment

    edit: i did the same thing @Subz did (a bit lazier), but I didnt spend those 5 minutes to not post it edit2: since ours both reset on asc 90 (back to 65), you would have to ensure the string is uppercase $sIn = StringUpper("ABCXYZ") $sOut = "" $arr = StringToASCIIArray($sIn) For $i = 0 to ubound($arr) - 1 $sOut &= $arr[$i] = 90 ? chr($arr[$i] + 1 - 26) : chr($arr[$i] + 1) Next msgbox(0 , '' , $sOut) Also, check my Gronsfeld Cipher that will let you increment based off an array of values rather than a static number
    1 point
  16. Subz

    Three letter increment

    You mean something like: #include <Array.au3> _Increment("AZ") _Increment("AZY") Func _Increment($_sString) Local $aString = StringSplit($_sString, "") For $i = 1 To $aString[0] If Asc($aString[$i]) = 90 Then $aString[$i] = Chr(65) Else $aString[$i] = Chr(Asc($aString[$i]) + 1) EndIf Next MsgBox(0,'', _ArrayToString($aString, "", 1)) EndFunc
    1 point
  17. Yes a nice script rasim. It is sure to be useful to other people and I thought it would be better to assume that the image sizes could be different and allow having the second image either to the right of the first or below it. By swapping the image parameters you can then acheive any position of one image relative to the other. #include <GDIPlus.au3> _BMPJoin("C:\Documents and Settings\Martin\My Documents\images\xr4andsaw.jpg","C:\Documents and Settings\Martin\My Documents\images\cutlass.jpg","joined.bmp") Func _BMPJoin($sFile1, $sFile2, $sResult, $Position = "right") Local $hSourceIMG1, $hSourceIMG2, $iWidth1, $width2, $iHeight1, $iHeight2, $hBitmap, $hImage, $hGraphic Local $iBwidth, $iBheight If Not FileExists(StringRegExpReplace($sResult, "(^.*)\\.*", "\1")) Then $sResult = @ScriptDir & "\result.bmp" _GDIPlus_Startup() $hSourceIMG1 = _GDIPlus_ImageLoadFromFile($sFile1) $hSourceIMG2 = _GDIPlus_ImageLoadFromFile($sFile2) $iWidth1 = _GDIPlus_ImageGetWidth($hSourceIMG1) $iHeight1 = _GDIPlus_ImageGetHeight($hSourceIMG1) $iHeight2 = _GDIPlus_ImageGetHeight($hSourceIMG2) $iWidth2 = _GDIPlus_ImageGetWidth($hSourceIMG2) $iHeight2 = _GDIPlus_ImageGetHeight($hSourceIMG2) If $Position = "right" Then $iBwidth = $iWidth1 + $iWidth2 $iBheight = $iHeight1 if $iHeight2 > $iHeight1 then $iBheight = $iHeight2 Else;position = "below" $iBwidth = $iWidth1 if $iWidth2 > $iWidth1 then $iBwidth = $iWidth2 $iBheight = $iHeight1 + $iHeight2 EndIf $hBitmap = _CreateBMP($iBwidth, $iBheight) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $hSourceIMG1, 0, 0, $iWidth1, $iHeight1, 0, 0, $iWidth1, $iHeight1) If $Position = "right" Then _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $hSourceIMG2, 0, 0, $iWidth2, $iHeight2, $iWidth1, 0, $iWidth2, $iHeight2) Else _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $hSourceIMG2, 0, 0, $iWidth2, $iHeight2, 0, $iHeight1, $iWidth2, $iHeight2) EndIf _GDIPlus_ImageSaveToFile($hImage, $sResult) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hSourceIMG1) _GDIPlus_ImageDispose($hSourceIMG2) _GDIPlus_Shutdown() EndFunc ;==>_BMPJoin Func _CreateBMP($sWidth, $sHeight) Local $hWnd, $hDC, $hBMP $hWnd = _WinAPI_GetDesktopWindow() $hDC = _WinAPI_GetDC($hWnd) $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $sWidth, $sHeight) _WinAPI_ReleaseDC($hWnd, $hDC) Return $hBMP EndFunc ;==>_CreateBMP
    1 point
  18. rasim

    Join two bitmap images?

    Hi! Example: #include <GDIPlus.au3> _BMPJoin(@ScriptDir & "\01.bmp", @ScriptDir & "\02.bmp", @ScriptDir & "\result.bmp") Func _BMPJoin($sFile1, $sFile2, $sResult) Local $hSourceIMG1, $hSourceIMG2, $iWidth, $iHeight, $hBitmap, $hImage, $hGraphic _GDIPlus_Startup() $hSourceIMG1 = _GDIPlus_ImageLoadFromFile($sFile1) $hSourceIMG2 = _GDIPlus_ImageLoadFromFile($sFile2) $iWidth = _GDIPlus_ImageGetWidth($hSourceIMG1) $iHeight = _GDIPlus_ImageGetHeight($hSourceIMG1) $hBitmap = _CreateBMP($iWidth * 2, $iHeight) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $hSourceIMG1, 0, 0, $iWidth, $iHeight, 0, 0, $iWidth, $iHeight) _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $hSourceIMG2, 0, 0, $iWidth, $iHeight, $iWidth, 0, $iWidth, $iHeight) _GDIPlus_ImageSaveToFile($hImage, $sResult) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hSourceIMG1) _GDIPlus_ImageDispose($hSourceIMG2) _GDIPlus_Shutdown() EndFunc ;==>_BMPJoin Func _CreateBMP($sWidth, $sHeight) Local $hWnd, $hDC, $hBMP $hWnd = _WinAPI_GetDesktopWindow() $hDC = _WinAPI_GetDC($hWnd) $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $sWidth, $sHeight) _WinAPI_ReleaseDC($hWnd, $hDC) Return $hBMP EndFunc ;==>_CreateBMP about: I hope you make this himself.
    1 point
×
×
  • Create New...