Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/2014 in all areas

  1. AuPad This is a notepad program written entirely in AutoIt. It has all the basics of notepad that you would expect. This is NOT feature complete, yet. I have included the source code for your pleasure, and feel free to give me pointers if you'd like to help out development (This is all done with AutoIt version 3.3.14.0) If you use any code from this, please leave a comment or something linking to this post, thank you. run the install to put the AuPad.exe and AuPad.ico in the program files directory under AuPad. Also, the install puts the RESH.au3 (all thanks to Beege) UDFs into your include folder for you. Included in the .zip: Install.exe, Install.au3, AuPad.au3, AuPad.exe, aupad.ico, uninstall.au3, Uninstall.exe, and RESH.au3 Current Version: 1.9.5 AuPad V1.9.5.zip ## Latest Update ## ---==== 1.9.5 ====--- - Fixed crash when selecting AutoIt Help - Set version number as 1.9.5 - Updated version history Current Features: Version History: Working on: If you would like to see any older versions feel free to ask and I will be happy to release them to whomever.
    2 points
  2. Try this: #include <APIDlgConstants.au3> #include <Memory.au3> #include <WinAPIDlg.au3> #include <WinAPIFiles.au3> #include <WindowsConstants.au3> Global $hHandle = DllCallbackRegister("_PrintHookProc", "INT_PTR", "hwnd;UINT;wparam;lparam") ; Create PRINTDLG structure and set initial values for the number of copies, starting, and ending page Local $tPRINTDLG = DllStructCreate($tagPRINTDLG) DllStructSetData($tPRINTDLG, 'Size', DllStructGetSize($tPRINTDLG)) DllStructSetData($tPRINTDLG, 'Flags', BitOR($PD_PAGENUMS, $PD_SHOWHELP, $PD_ENABLEPRINTHOOK)) DllStructSetData($tPRINTDLG, 'FromPage', 2) DllStructSetData($tPRINTDLG, 'ToPage', 3) DllStructSetData($tPRINTDLG, 'MinPage', 1) DllStructSetData($tPRINTDLG, 'MaxPage', 9) DllStructSetData($tPRINTDLG, 'Copies', 4) DllStructSetData($tPRINTDLG, 'PrintHook', DllCallbackGetPtr($hHandle)) ; Create Print dialog box If Not _WinAPI_PrintDlg($tPRINTDLG) Then Exit EndIf ; Show results Local $hDevNames = DllStructGetData($tPRINTDLG, 'hDevNames') Local $pDevNames = _MemGlobalLock($hDevNames) Local $tDEVNAMES = DllStructCreate($tagDEVNAMES, $pDevNames) ConsoleWrite('Printer: ' & _WinAPI_GetString($pDevNames + 2 * DllStructGetData($tDEVNAMES, 'DeviceOffset'))) If DllStructGetData($tDEVNAMES, 'Default') Then ConsoleWrite(' (Default)' & @CRLF) Else ConsoleWrite(@CRLF) EndIf ConsoleWrite('First page: ' & DllStructGetData($tPRINTDLG, 'FromPage') & @CRLF) ConsoleWrite('Last page: ' & DllStructGetData($tPRINTDLG, 'ToPage') & @CRLF) ConsoleWrite('Copies: ' & DllStructGetData($tPRINTDLG, 'Copies') & @CRLF) ; Free global memory objects that contains a DEVMODE and DEVNAMES structures _MemGlobalFree(DllStructGetData($tPRINTDLG, 'hDevMode')) _MemGlobalFree($hDevNames) DllCallbackFree($hHandle) Func _PrintHookProc($hWnd, $iMsg, $wParam, $lParam) Local $nID = BitAND($wParam, 0x0000FFFF) If $iMsg = $WM_INITDIALOG Then ControlHide($hWnd, "", "Button2") EndIf If $iMsg = $WM_COMMAND Then Switch $nID Case 1038 MsgBox(0, "Danyfirex", "Danyfirex says Hi!!!") ;~ ShellExecute("here your CHM file") Return 0 EndSwitch EndIf Return 0 EndFunc ;==>_PrintHookProc Saludos
    2 points
  3. Try using _Excel_RangeWrite with the $bForceFunc set to true, it works when using the _ArrayTranspose function but doesn't when using the $oExcel.Transpose method.
    1 point
  4. Not? Don't worry! I am too! We are in the same boat!
    1 point
  5. UEZ

    Sunken Edge Repainting Issue

    Cool hairstyle. Br, UEZ
    1 point
  6. jdelaney

    Automated testing

    I'd highly suggest using a script like min relative to yours. Sends are not reliable.
    1 point
  7. Jewtus, When deleting rows from an array, always work from the bottom up. M23
    1 point
  8. Very nice script. Still works after small change: AdlibEnable >>> AdlibRegister I also make some celanup. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #include <GUIConstants.au3> #include <GuiEdit.au3> #include <Misc.au3> Global $g_iMainLineCount = 0 ; Keep a global count so we can check if it has changed Global $_idEdit_Num , $_idEdit_Main Example() Func Example() Local $hGui = GUICreate("Example", 123, 176, 415, 239, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_OVERLAPPEDWINDOW, $WS_TILEDWINDOW, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_TABSTOP, $WS_BORDER, $WS_CLIPSIBLINGS)) #forceref $hGui $_idEdit_Num = GUICtrlCreateEdit("", 0, 0, 25, 165, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetData(-1, "1") GUICtrlSetBkColor(-1, 0xC0DCC0) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH) $_idEdit_Main = GUICtrlCreateEdit("", 26, 0, 96, 175, -1, 0) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM) GUICtrlCreateLabel("", 0, 164, 25, 11) GUICtrlSetBkColor(-1, 0xC0DCC0) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH) GUISetState(@SW_SHOW) AdlibRegister("_LineNum", 100) Local $Msg While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>Example Func _LineNum() ; line numbering Local $iCount = _GUICtrlEdit_GetLineCount($_idEdit_Main) ;Check if the number of lines has changed in $_idEdit_Main ;since this function was last called If $iCount <> $g_iMainLineCount Then ;save the new count to the global variable $g_iMainLineCount = $iCount Local $iNumCount = _GUICtrlEdit_GetLineCount($_idEdit_Num) If $g_iMainLineCount > $iNumCount Then For $i = $iNumCount + 1 To $g_iMainLineCount _GUICtrlEdit_AppendText($_idEdit_Num, @CRLF & $i) Next ElseIf $g_iMainLineCount < $iNumCount Then Local $text = GUICtrlRead($_idEdit_Num) For $i = $iNumCount To $g_iMainLineCount + 1 Step -1 $text = StringReplace($text, @CRLF & $i, "") Next GUICtrlSetData($_idEdit_Num, $text) EndIf EndIf Local $iFirstVisMain = _GUICtrlEdit_GetFirstVisibleLine($_idEdit_Main) Local $iFirstVisNum = _GUICtrlEdit_GetFirstVisibleLine($_idEdit_Num) If $iFirstVisMain <> $iFirstVisNum Then _GUICtrlEdit_LineScroll($_idEdit_Num, 0, $iFirstVisMain - $iFirstVisNum) EndIf EndFunc ;==>_LineNum
    1 point
×
×
  • Create New...