Leaderboard
Popular Content
Showing content with the highest reputation on 07/14/2017 in all areas
-
Version 1.7.0.1
10,054 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2020-02-09) None1 point -
Basic Notepad Program
autoautoauto reacted to Skeletor for a topic
Hi Guys, When I used to scratch the surface with Delphi5, I could only create a simple Notepad program. Now that I'm into AutoIt, I've created just a bare bone Notepad. Can be improved, but maybe this will be useful for those, like me, starting out with programming. I know there are way better notepads out there like Aupad, but, #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <APIDlgConstants.au3> #include <Memory.au3> #include <WinAPIDlg.au3> #include <WinAPIFiles.au3> Opt('WinTitleMatchMode', 3) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Notepad", 620, 440, 192, 124) $MenuItem1 = GUICtrlCreateMenu("File") $MenuItem4 = GUICtrlCreateMenuItem("New" & @TAB & "Ctrl+N", $MenuItem1) $MenuItem5 = GUICtrlCreateMenuItem("Open" & @TAB & "Ctrl+O", $MenuItem1) $MenuItem6 = GUICtrlCreateMenuItem("Save" & @TAB & "Ctrl+S", $MenuItem1) $MenuItem17 = GUICtrlCreateMenuItem("Print" & @TAB & "Ctrl+P", $MenuItem1) $MenuItem7 = GUICtrlCreateMenuItem("Exit" & @TAB & "Ctrl+W", $MenuItem1) $MenuItem2 = GUICtrlCreateMenu("Edit") $MenuItem8 = GUICtrlCreateMenuItem("Undo" & @TAB & "Ctrl+Z", $MenuItem2) $MenuItem9 = GUICtrlCreateMenuItem("Cut" & @TAB & "Ctrl+X", $MenuItem2) $MenuItem10 = GUICtrlCreateMenuItem("Copy" & @TAB & "Ctrl+C", $MenuItem2) $MenuItem11 = GUICtrlCreateMenuItem("Paste" & @TAB & "Ctrl+V", $MenuItem2) $MenuItem12 = GUICtrlCreateMenuItem("Delete" & @TAB & "Del", $MenuItem2) $MenuItem16 = GUICtrlCreateMenu("Format") $MenuItem19 = GUICtrlCreateMenuItem("Word Wrap", $MenuItem16) $MenuItem18 = GUICtrlCreateMenuItem("Font", $MenuItem16) $MenuItem15 = GUICtrlCreateMenu("View") $MenuItem20 = GUICtrlCreateMenuItem("Status Bar", $MenuItem15) $MenuItem3 = GUICtrlCreateMenu("Help") $MenuItem13 = GUICtrlCreateMenuItem("View Help", $MenuItem3) $MenuItem14 = GUICtrlCreateMenuItem("About Notepad" & @TAB & "F1", $MenuItem3) $Edit1 = GUICtrlCreateEdit("", 0, 0, 620, 420, $ES_WANTRETURN) GUICtrlSetFont($Edit1, 10, 400, -1, "Lucida Console") GUICtrlSetData(-1, "") Dim $Form1_AccelTable[11][2] = [["^n", $MenuItem4], ["^o", $MenuItem5], ["^s", $MenuItem6], ["^p", $MenuItem17], ["^w", $MenuItem7], ["^z", $MenuItem8], ["^x", $MenuItem9], ["^c", $MenuItem10], ["^v", $MenuItem11], ["{DEL}", $MenuItem12], ["{F1}", $MenuItem14]] GUISetAccelerators($Form1_AccelTable) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52, "Notepad Closing", "Are you sure you want to exit?") Select Case $iMsgBoxAnswer = 6 ;Yes Exit Case $iMsgBoxAnswer = 7 ;No EndSelect #EndRegion --- CodeWizard generated code Start --- Case $MenuItem4 GUICtrlSetData($Edit1, "") Case $MenuItem5 FileOpenDialog("Open Text File", @DesktopDir, "Text File (*.txt)") Case $MenuItem6 $filesave = FileSaveDialog("Save Text File", @DesktopDir, "Text File (*.txt)") $Edit1_Read = GUICtrlRead($Edit1) FileWrite($filesave, $Edit1_Read) Case $MenuItem7 #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52, "Notepad Closing", "Are you sure you want to exit?") Select Case $iMsgBoxAnswer = 6 ;Yes Exit Case $iMsgBoxAnswer = 7 ;No EndSelect #EndRegion --- CodeWizard generated code Start --- EndSwitch WEnd If you don't attempt something, you never know you can actually achieve that goal.1 point -
Looks good. Will test this and feedback1 point
-
A Beep music made by me Enjoy ! ;################################################### ; Mario Bros Theme ( Beep Music )################### ;################################################### ;###################### by J0keR ################## ;################################################### Beep(480,200); Beep(1568,200); Beep(1568,200); Beep(1568,200); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(783.99,200); Beep(369.99,200); Beep(392,200); Beep(369.99,200); Beep(392,200); Beep(392,400); Beep(196,400); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(739.99,200); Beep(83.99,200); Beep(880,200); Beep(830.61,200); Beep(880,200); Beep(987.77,400); Beep(880,200); Beep(783.99,200); Beep(698.46,200); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(739.99,200); Beep(783.99,200); Beep(880,200); Beep(830.61,200); Beep(880,200); Beep(987.77,400); Sleep(200); Beep(1108,10); Beep(1174.7,200); Beep(1480,10); Beep(1568,200); Sleep(200); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(739.99,200); Beep(783.99,200); Beep(783.99,200); Beep(739.99,200); Beep(783.99,200); Beep(880,200); Beep(830.61,200); Beep(880,200); Beep(987.77,400); Beep(880,200); Beep(783.99,200); Beep(698.46,200); Beep(659.25,200); Beep(698.46,200); Beep(784,200); Beep(880,400); Beep(784,200); Beep(698.46,200); Beep(659.25,200); Beep(587.33,200); Beep(659.25,200); Beep(698.46,200); Beep(784,400); Beep(698.46,200); Beep(659.25,200); Beep(587.33,200); Beep(523.25,200); Beep(587.33,200); Beep(659.25,200); Beep(698.46,400); Beep(659.25,200); Beep(587.33,200); Beep(493.88,200); Beep(523.25,200); Sleep(400); Beep(349.23,400); Beep(392,200); Beep(329.63,200); Beep(523.25,200); Beep(493.88,200); Beep(466.16,200); Beep(440,200); Beep(493.88,200); Beep(523.25,200); Beep(880,200); Beep(493.88,200); Beep(880,200); Beep(1760,200); Beep(440,200); Beep(392,200); Beep(440,200); Beep(493.88,200); Beep(783.99,200); Beep(440, 200); Beep(783.99,200); Beep(1568,200); Beep(392,200); Beep(349.23,200); Beep(392,200); Beep(440,200); Beep(698.46,200); Beep(415.2,200); Beep(698.46,200); Beep(1396.92,200); Beep(349.23,200); Beep(329.63,200); Beep(311.13,200); Beep(329.63,200); Beep(659.25,200); Beep(698.46,400); Beep(783.99,400); Beep(440,200); Beep(493.88,200); Beep(523.25,200); Beep(880,200); Beep(493.88,200); Beep(880,200); Beep(1760,200); Beep(440,200); Beep(392,200); Beep(440,200); Beep(493.88,200); Beep(783.99,200); Beep(440,200); Beep(783.99,200); Beep(1568,200); Beep(392,200); Beep(349.23,200); Beep(392,200); Beep(440,00); Beep(698.46,200); Beep(659.25,200); Beep(698.46,200); Beep(739.99,200); Beep(783.99,200); Beep(392,200); Beep(392,200); Beep(392,200); Beep(392,200); Beep(196,200); Beep(196,200); Beep(196,200); Beep(185,200); Beep(196,200); Beep(185,200); Beep(196,200); Beep(207.65,200); Beep(220,200); Beep(233.08,200); Beep(246.94,200);1 point
-
Adding to combobox
Xiengsaephan reacted to KickStarter15 for a topic
@Xiengsaephan, FileWriteLine() and FileWrite() can be used for this. #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 124) $Combo1 = GUICtrlCreateCombo("", 40, 24, 201, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Combo1, "Item 1|Item 2") $Button1 = GUICtrlCreateButton("Button1", 32, 56, 57, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 Local $file = FileOpen(@ScriptDir & "\Your.ini", 1) FileWriteLine($file, GUICtrlRead($Combo1)) FileClose($file) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd KS151 point -
can i modify $x,$y coordinates to look -100,-100 ?
TwistedXion reacted to Teckx for a topic
well anyways I noticed that when searching for the name having the mouse move to the variable coordinate it highlighted the button so I was able to now search for that highlighted button . awesome but for education purposes is there a way to change coordinates based on subtracting from the variable?1 point -
U r welcome. Try this: Br, UEZ1 point
-
I have change a bit here and there in the Excel UDF myself. Have a few requests.. Additional possibilities in the font parameters. Right now can only change bold, italic, underline. Perhaps something else than a (long) parameter list is better, different functions ? Not sure.. Font .name and .size at leastSet shading and coloring of cellsControl of borders on range / cell, both linestyle, width and colorControl of print area (mark area for printout)Run macro on excel side (execute VBA).Some examples: With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With With Selection.Font .Name = "Calibri" .Size = 14 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .ThemeFont = xlThemeFontMinor End With With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight2 .TintAndShade = 0.399975585192419 .PatternTintAndShade = 0 End With With Selection .HorizontalAlignment = xlLeft .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With1 point
-
Seems like SetParent is what you need to do. #include <GuiConstants.au3> $Main_GUI = GUICreate("Main") $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 200, 100, 10, 50, $WS_CAPTION) GUISetBkColor(0xfffaf0, $Child_GUI) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($Child_GUI), "hwnd", WinGetHandle($Main_GUI)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Btn_Exit Exit Case $Btn_Test MsgBox(0, "Test", "Hit Button on Child Window") EndSwitch WEnd1 point