Leaderboard
Popular Content
Showing content with the highest reputation on 02/15/2015 in all areas
-
I played around a little with http://www.chilkatsoft.com/ ActiveX components. Here is an example based on examples from this page. #include <FileConstants.au3> #include <MsgBoxConstants.au3> ;~ http://www.chilkatsoft.com/downloads_ActiveX.asp ;~ http://www.chilkatsoft.com/support.asp ;~ http://www.chilkatsoft.com/refdoc/activex.asp ;~ http://www.chilkatsoft.com/refdoc/xChilkatCertStoreRef.html ;~ http://www.chilkatsoft.com/refdoc/xChilkatCertChainRef.html ;~ Email ActiveX Reference Documentation ;~ http://www.chilkatsoft.com/refdoc/xChilkatEmailRef.html ;~ http://www.example-code.com/vbscript/emailObj.asp ;~ http://www.example-code.com/vbscript/pop3.asp Global $_sPOP3_Server = 'xxxxxx' Global $_sPOP3_UserName = 'xxxxxx' Global $_sPOP3_Password = 'xxxxxx' _Example_1_Version() _Example_2_Get_number_of_mesages() _Example_3_Retrieve_UIDLs_from_POP3_Server() _Example_4_Save_Email_Attachments_to_Filesystem() Func _Example_1_Version() Local $oCrypt = ObjCreate("Chilkat_9_5_0.Crypt2") MsgBox(0, '', $oCrypt.Version) EndFunc ;==>_Example_1_Version Func _Example_2_Get_number_of_mesages() ; http://www.example-code.com/vbscript/pop3_mailboxCount.asp ; The mailman object is used for receiving (POP3) ; and sending (SMTP) email. ; This ObjCreate statement uses the new single-DLL ActiveX for v9.5.0 Local $oMailman = ObjCreate("Chilkat_9_5_0.MailMan") ; Any string argument automatically begins the 30-day trial. $success = $oMailman.UnlockComponent("30-day trial") If ($success <> 1) Then MsgBox(0, 'UnlockComponent', $oMailman.LastErrorText) Return EndIf ; Set the POP3 server's hostname $oMailman.MailHost = $_sPOP3_Server ; Set the POP3 login/password. $oMailman.PopUsername = $_sPOP3_UserName $oMailman.PopPassword = $_sPOP3_Password ; Get the number of messages in the mailbox. Local $iNumMessages = $oMailman.GetMailboxCount() MsgBox(0, '', $iNumMessages) EndFunc ;==>_Example_2_Get_number_of_mesages Func _Example_3_Retrieve_UIDLs_from_POP3_Server() ; Retrieve UIDL's from POP3 Server ; http://www.example-code.com/vbscript/pop3_getUidls.asp ; The mailman object is used for receiving (POP3) ; and sending (SMTP) email. ; This ObjCreate statement uses the new single-DLL ActiveX for v9.5.0 Local $oMailman = ObjCreate("Chilkat_9_5_0.MailMan") ; Any string argument automatically begins the 30-day trial. $success = $oMailman.UnlockComponent("30-day trial") If ($success <> 1) Then MsgBox(0, 'UnlockComponent', $oMailman.LastErrorText) Return EndIf ; Set the POP3 server's hostname $oMailman.MailHost = $_sPOP3_Server ; Set the POP3 login/password. $oMailman.PopUsername = $_sPOP3_UserName $oMailman.PopPassword = $_sPOP3_Password ; sa is a Chilkat_9_5_0.StringArray Local $oSA = $oMailman.GetUidls() Local $iCount = $oSA.Count For $i = 0 To $iCount - 1 ConsoleWrite($oSA.GetString($i) & @CRLF) Next EndFunc ;==>_Example_3_Retrieve_UIDLs_from_POP3_Server Func _Example_4_Save_Email_Attachments_to_Filesystem() ; Save Email Attachments to Filesystem ; http://www.example-code.com/vbscript/emailObject_saveAttachments.asp Local $oEmail = ObjCreate("Chilkat_9_5_0.Email") ; Load an email object containing attachments. ; This .eml can be downloaded from: ; http://www.example-code.com/testData/HtmlEmail.eml Local $sEML_FileFullPath = FileOpenDialog('Choose EML File', @ScriptDir, 'EML file (*.eml)', $FD_FILEMUSTEXIST) If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No file(s) were selected.") Return 0 EndIf Local $iSuccess = $oEmail.LoadEml($sEML_FileFullPath) If ($iSuccess <> 1) Then ConsoleWrite($oEmail.LastErrorText & @CRLF) Return 0 EndIf ; If OverwriteExisting is turned on, files with the same ; name are overwritten. If turned off, new/unique filenames ; are automatically generated. The filenames actually saved ; are accessible via the GetAttachmentFilename method. $oEmail.OverwriteExisting = 1 ; Save all attachments to the "myAttachments" subdirectory ; found under the calling process;s current working directory. ; This directory is automatically created if it does not already ; exist. $iSuccess = $oEmail.SaveAllAttachments("myAttachments") If ($iSuccess <> 1) Then ConsoleWrite($oEmail.LastErrorText & @CRLF) Return 0 EndIf ; List the attachment filenames: For $i = 0 To $oEmail.NumAttachments - 1 ConsoleWrite($oEmail.GetAttachmentFilename($i) & @CRLF) Next EndFunc ;==>_Example_4_Save_Email_Attachments_to_Filesystem Best regards mLipok2 points
-
mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples1 point
-
You can use e.g. _GDIPlus_BrushCreateSolid(0xFFABCDEF) to create a brush color using hex numbers whereas the format is 0xARGB . I'm using always hex format because it is much more readable than using an intereger! Br, UEZ1 point
-
orbs, You could try adding the highlighting manually by extracting, modifying and reloading the RTF stream - something like this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiRichEdit.au3> Global Const $nGUI_MaxW = 500, $nGUI_MaxH = 400 Global $nGUI_W = 720, $nGUI_H = 500, $nRichEditOffset = 10, $nToolbarOffset = 35 Global $hGui = GUICreate('_GUICtrlRichEdit_SetCharBkColor performance test', $nGUI_W, $nGUI_H) GUISetBkColor(0xCCDDEE) Global $hRichEdit = _GUICtrlRichEdit_Create($hGui, FileRead(@ScriptFullPath) & @LF, $nRichEditOffset, $nRichEditOffset + $nToolbarOffset, $nGUI_W - $nRichEditOffset * 2, $nGUI_H - $nRichEditOffset * 2 - $nToolbarOffset - 24, BitOR($ES_MULTILINE, $ES_READONLY, $WS_HSCROLL, $WS_VSCROLL)) _GUICtrlRichEdit_SetFont($hRichEdit, Default, 'Courier New') $nBegin = TimerInit() ; Make sure there is no selection _GUICtrlRichEdit_Deselect($hRichEdit) ; Read the RTF stream $sContent = _GUICtrlRichEdit_StreamToVar($hRichEdit) ; Define the highlight colour $sColDef = "{\colortbl ;\red255\green128\blue128;}" ; This is \highlight1, you can add as many others as you want ; And add it as line 2 $sContent = StringReplace($sContent, ";}}", ";}}" & @CRLF & $sColDef) ; Search for RichEdit $sSearch = "RichEdit" ; And highlight all occurences $sContent = StringRegExpReplace($sContent, $sSearch, "\\highlight1 " & $sSearch & "\\highlight0 ") ; highlight0 is the base colour ; Now replace the current text with thhighlighted version _GUICtrlRichEdit_StreamFromVar($hRichEdit, $sContent) ConsoleWrite(TimerDiff($nBegin) & @CRLF) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($hRichEdit) Exit EndSwitch WEnd That runs lightning fast on my system. M231 point
-
Anyone know of a C# macro/automation framework?
kylomas reacted to JLogan3o13 for a topic
Based on your posts and the link above, I am going to suggest you read the Forum Rules, especially the part where discussion of game automation and interaction is forbidden (mainly because it is lame and stupid).1 point -
Congratulations JohnOne! Thank you czardas, jaberwacky and everyone involved, that was fun!1 point
-
I am not familiar with the AHK Scite implementation, but the only way I can see this work from a SciTE4AutoIt3 point of view is: Use the SciTE4AutoIt3 installer and copy the configs from AHK to the the appropriate directories: C:Program Files (x86)AutoIt3SciTEAPI C:Program Files (x86)AutoIt3SciTEProperties %localappdata%AutoIt v3SciTE which is the Set as the directory to put the user info in for SciTE. Use the portable version of SciTE4AutoIt3 which doesn't use any environment variable and looks for user files in the SciTE root directory. Again, You have to find out what AHK SciTE has for customising, but the SciTE version I maintain has a much more up-to-date au3lexer and several small other changes. Jos1 point
-
perhaps this question is more suited to the SciTE forum. how about - not tested - installing each SciTE in a different folder? EDIT: SciTE4AutoHotkey default install folder is "C:Program FilesAutoHotkeySciTE" - quite different than AutoIt install folder. please check that you indeed have installed both versions in different folders. EDIT: i just installed SciTE4AutoHotkey at default folder. except the .ahk association (which probably requires reboot, but i did manually) i see no issues. my .ahk and .au3 scripts open and execute in their corresponding SciTE versions.1 point
-
Same idea... $hGui = GuiCreate("test") GuiSetState() $WorkAera = _GetWorkArea() WinMove($hGui, "", $WorkAera[0], $WorkAera[1], $WorkAera[4], $WorkAera[5]) While GUIGetMsg() <> -3 WEnd Func _GetWorkArea() Local $Area[6] Local $StartRect = DllStructCreate("int[4]") Local $PStartRect = DllStructGetPtr($StartRect) DllCall("user32.dll", "int", "SystemParametersInfo", "int", 48, "int", 0, "ptr", $PStartRect, "int", 0) $Area[0] = DllStructGetData($StartRect,1,1) $Area[1] = DllStructGetData($StartRect,1,2) $Area[2] = DllStructGetData($StartRect,1,3) $Area[3] = DllStructGetData($StartRect,1,4) $Area[4] = $Area[2] - $Area[0] $Area[5] = $Area[3] - $Area[1] Return $Area EndFunc1 point