Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/13/2015 in all areas

  1. Yashied

    SciTE 3.5.5.101 for AutoIt

    This is my modification of the editor based on SciTE 3.2.5.99. Too many changes are made. Added new plugins (.lua) and rewrited existing, added Toolbar and Sidebar, expanded main and context menu, and more... I will not list all the changes, just download and try it. I also want to say a big thank the staff of Ru-Board for the excellent work on the modification of the editor and writing great plugins (.lua). Compiler Wrapper (CW) - a new tool that is part of SciTE 3.2.5.99 and designed to replace the AutoItWrapper. CW only works with "pragma" directives and does not use "AutoIt3Wrapper" directives. CW differs from AutoItWrapper both externally and internally but has a similar logic. Here are some possibilities utility - more friendly GUI, all options of "pragma" directives are located in one window, the ability to add digital signature, and a simple way to add resources (.rcs and .res files). The current version of CW is compatible with AutoIt 3.3.10.x, 3.3.12.x, and 3.3.14.x. How to install? Unpack CW to Compiler Wrapper folder and copy it to your SciTE or SciTE\Tools directory. Note that if you download SciTE 3.2.5.99 then you need not do anything because CW is already installed in the package. Command lines for SciTE: #Command line for compilation command.compile.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:1 /c:0 command.compile.subsystem.au3=1 #Command line for building (without GUI) command.build.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:1 /c:0 /s:1 command.build.subsystem.$(au3)=1 #Command line for changing "pragma" options only command.90.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:2 command.name.90.au3=Compiler Options... command.shortcut.90.au3=Shift+F7 command.subsystem.90.au3=1 command.save.before.90.au3=1 Command lines for Windows Explorer context menu: ;Command line for compilation "C:\Program Files (x86)\SciTE\Tools\Compiler Wrapper\CW.exe" "%1" /m:0 /c:0 ;Command line for building (without GUI) "C:\Program Files (x86)\SciTE\Tools\Compiler Wrapper\CW.exe" "%1" /m:0 /c:0 /s:1 Screenshots Files to download You can download latest SciTE build on this page (bottom of the post) or by using the SciTE Updater.
    1 point
  2. ajag

    Function dosent work

    Permissions? I think Vista does not allow to write to the root directory (C:\). Try #RequireAdmin. Ajag [to late...]
    1 point
  3. BrewManNH

    Function dosent work

    Your ini file is in the root of the C: drive, in Vista and above that is a protected folder that requires administrator access. You'll need to move where the INI file is located, or use #RequireAdmin in the script, to be able to write to or create the INI file there.
    1 point
  4. ​This is a very simple modification in the SciTE source SciTEWinDlg.cxx: OPENFILENAMEW ofn; memset(&ofn, 0, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = MainHWND(); ofn.hInstance = hInstance; ofn.lpstrFile = saveName; ofn.nMaxFile = ELEMENTS(saveName); GUI::gui_string translatedTitle = localiser.Text(title); ofn.lpstrTitle = translatedTitle.c_str(); ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR; ofn.lpstrFilter = filesFilter; ofn.lpstrInitialDir = directory.AsInternal(); //+ SciTE4Autoit3 => Start Update => Setting this to an empty string triggers the "add default extension if no registered extension is typed". ofn.lpstrDefExt = GUI_TEXT(""); Jos
    1 point
  5. wakillon

    jpg to gif

    Try GifcamEx You can create an animated gif frame by frame
    1 point
  6. I'm using inconsolata on the forum. I suggest changing it but getting everyone to agree would be pointless. Haha.
    1 point
  7. Melba23

    Fibonacci Clock

    The Fibonacci clock lets you know the time by changing colours and requiring you do some adding up. The Fibonacci sequence is the sequence beginning 1, 1 and where each number is the sum of the previous two. Its first five digits are: 1, 1, 2, 3, 5. These numbers are all you need to express all the numbers from 1 to 12. 1 = 1 1+1 = 2 ... 1 + 1 + 2 + 3 + 5 = 12 which means that it is possible to use them to describe the twelve positions on a clock, and therefore tell the time in 5 minute intervals. Philippe Chrétien of Montreal Canada made such a clock with squares of side length 1, 1, 2, 3, and 5 (the numbers in the Fibonacci sequence) arranged into a "golden rectangle". The squares lit up in red tell you the hour, and in green give you the minutes (in multiples of five). A square lit up in blue meant it is to be added for both hour and minute. Transparent squares are ignored. The first example below decodes as follows: Hours, red 5, red 1 and blue 3 = 5 + 1 + 3 = 9 hours Minutes: green 2 and blue 3 = 2 + 3 = 5. 5 x 5 = 25 minutes. So, the time is 9.25. And here is a little script to show how you can create a Fibonacci clock of your own - by default it shows the current time (which you can reset at any time using the "Reset" button) or you can test it by entering a time in the combos: #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Date.au3> $iMargin_X = 10 $iMargin_Y = 10 $iMargin_Inter = 5 $iSize = 50 $iButton_Level = ($iSize * 5) + $iMargin_Inter + 20 $hGUI = GUICreate("Fibonacci Clock", ($iSize * 8) + ($iMargin_X * 2), $iButton_Level + 100) GUISetBkColor(0xC4C4C4) $cBack = GUICtrlCreateLabel("", $iMargin_X - $iMargin_Inter, $iMargin_Y - $iMargin_Inter, _ ($iSize * 8) + ($iMargin_Inter * 2), ($iSize * 5) + $iMargin_Inter) GUICtrlSetBkColor($cBack, 0x000000) $cLabel_1A = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 2), $iMargin_Y, $iSize - $iMargin_Inter, $iSize - $iMargin_Inter) $cLabel_1B = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 2), $iMargin_Y + $iSize, $iSize - $iMargin_Inter, $iSize - $iMargin_Inter) $cLabel_2 = GUICtrlCreateLabel("", $iMargin_X, $iMargin_Y, ($iSize * 2) - $iMargin_Inter, ($iSize * 2) - $iMargin_Inter) $cLabel_3 = GUICtrlCreateLabel("", $iMargin_X, $iMargin_Y + ($iSize * 2), ($iSize * 3) - $iMargin_Inter, ($iSize * 3) - $iMargin_Inter) $cLabel_5 = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 3), $iMargin_Y, $iSize * 5, ($iSize * 5) - $iMargin_Inter) $cUserSet = GUICtrlCreateButton("Set User Time", $iMargin_X, $iButton_Level, 100, 30) $cUserHour = GUICtrlCreateCombo("", $iMargin_X + 120, $iButton_Level, 40, 20) GUICtrlSetData($cUserHour, "00|01|02|03|04|05|06|07|08|09|10|11|12") $cUserMin = GUICtrlCreateCombo("", $iMargin_X + 160, $iButton_Level, 40, 20) GUICtrlSetData($cUserMin, "00|05|10|15|20|25|30|35|40|45|50|55") $cReset = GUICtrlCreateButton("Reset Current Time", $iMargin_X, $iButton_Level + 50, 120, 30) GUICtrlCreateLabel("Hours:" & @CRLF & @CRLF & "Mins:" & @CRLF & @CRLF & "Both:", 250, $iButton_Level, 150, 80) GUICtrlCreateLabel("", 300, $iButton_Level, 50, 20) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlCreateLabel("", 300, $iButton_Level + 25, 50, 20) GUICtrlSetBkColor(-1, 0x00FF00) GUICtrlCreateLabel("", 300, $iButton_Level + 50, 50, 20) GUICtrlSetBkColor(-1, 0x0000FF) GUISetState() _Reset() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cReset _Reset() Case $cUserSet $iHour = GUICtrlRead($cUserHour) $iMin = GUICtrlRead($cUserMin) / 5 _Set_Clock($iHour, $iMin) EndSwitch WEnd Func _Reset() $sDTG = _NowCalc() $iHour = StringRegExpReplace($sDTG, "^.*\s(\d\d):.*", "$1") $iHour = (($iHour > 12) ? ($iHour - 12) : ($iHour)) $iMin = Int(StringRegExpReplace($sDTG, "^.*:(\d\d):.*", "$1") / 5) _Set_Clock($iHour, $iMin) EndFunc ;==>_Reset Func _Set_Clock($iH, $iM) $iH = Number($iH) $iM = Number($iM) ;ConsoleWrite("Entry: " & $iH & " - " & $iM & @CRLF) GUICtrlSetBkColor($cLabel_1A, 0xC4C4C4) GUICtrlSetBkColor($cLabel_1B, 0xC4C4C4) GUICtrlSetBkColor($cLabel_2, 0xC4C4C4) GUICtrlSetBkColor($cLabel_3, 0xC4C4C4) GUICtrlSetBkColor($cLabel_5, 0xC4C4C4) $iState_1A = 0 $iState_1B = 0 $iState_2 = 0 $iState_3 = 0 $iState_5 = 0 While $iH ;ConsoleWrite($iH & @CRLF) Switch $iH Case 5 To 12 ;;ConsoleWrite("5-12" & @CRLF) If Not $iState_5 Then ;;ConsoleWrite("- 5" & @CRLF) $iH -= 5 GUICtrlSetBkColor($cLabel_5, 0XFF0000) $iState_5 = 1 Else ContinueCase EndIf Case 3 To 12 ;;ConsoleWrite("3-12" & @CRLF) If Not $iState_3 Then ;;ConsoleWrite("- 3" & @CRLF) $iH -= 3 GUICtrlSetBkColor($cLabel_3, 0XFF0000) $iState_3 = 1 Else ContinueCase EndIf Case 2 To 12 ;;ConsoleWrite("2-12" & @CRLF) If Not $iState_2 Then ;;ConsoleWrite("- 2" & @CRLF) $iH -= 2 GUICtrlSetBkColor($cLabel_2, 0XFF0000) $iState_2 = 1 Else ContinueCase EndIf Case Else ;;ConsoleWrite("Else" & @CRLF) If $iState_1A Then ;;ConsoleWrite("- 1B" & @CRLF) $iH -= 1 GUICtrlSetBkColor($cLabel_1B, 0XFF0000) $iState_1B = 1 Else ;;ConsoleWrite("- 1A" & @CRLF) $iH -= 1 GUICtrlSetBkColor($cLabel_1A, 0XFF0000) $iState_1A = 1 EndIf EndSwitch WEnd While $iM Switch $iM Case 5 To 12 $bContinueCase = False ;ConsoleWrite("5-12" & @CRLF) Switch $iState_5 Case 0 ;ConsoleWrite("-5:G" & @CRLF) $iM -= 5 GUICtrlSetBkColor($cLabel_5, 0X00FF00) $iState_5 = 2 Case 1 ;ConsoleWrite("-5:B" & @CRLF) $iM -= 5 GUICtrlSetBkColor($cLabel_5, 0X0000FF) $iState_5 = 2 Case 2 $bContinueCase = True EndSwitch If $bContinueCase Then ContinueCase Case 3 To 12 ;ConsoleWrite("3-12" & @CRLF) $bContinueCase = False Switch $iState_3 Case 0 ;ConsoleWrite("-3:G" & @CRLF) $iM -= 3 GUICtrlSetBkColor($cLabel_3, 0X00FF00) $iState_3 = 2 Case 1 ;ConsoleWrite("-3:B" & @CRLF) $iM -= 3 GUICtrlSetBkColor($cLabel_3, 0X0000FF) $iState_3 = 2 Case 2 $bContinueCase = True EndSwitch If $bContinueCase Then ContinueCase Case 2 To 12 ;ConsoleWrite("2-12" & @CRLF) $bContinueCase = False Switch $iState_2 Case 0 ;ConsoleWrite("-2:G" & @CRLF) $iM -= 2 GUICtrlSetBkColor($cLabel_2, 0X00FF00) $iState_2 = 2 Case 1 ;ConsoleWrite("-2:B" & @CRLF) $iM -= 2 GUICtrlSetBkColor($cLabel_2, 0X0000FF) $iState_2 = 2 Case 2 $bContinueCase = True EndSwitch If $bContinueCase Then ContinueCase Case Else Switch $iState_1A Case 2 $iM -= 1 If $iState_1B Then ;ConsoleWrite("-1B:B" & @CRLF) GUICtrlSetBkColor($cLabel_1B, 0X0000FF) Else ;ConsoleWrite("-1B:G" & @CRLF) GUICtrlSetBkColor($cLabel_1B, 0X00FF00) EndIf Case 1 ;ConsoleWrite("-1A:B" & @CRLF) $iM -= 1 If $iState_1B = 0 Then GUICtrlSetBkColor($cLabel_1B, 0x00FF00) $iState_1B = 1 Else GUICtrlSetBkColor($cLabel_1A, 0x0000FF) $iState_1A = 2 EndIf Case Else ;ConsoleWrite("-1A:G" & @CRLF) $iM -= 1 GUICtrlSetBkColor($cLabel_1A, 0x00FF00) $iState_1A = 1 EndSwitch EndSwitch WEnd EndFunc ;==>_Set_ClockIf anyone can produce shorter internal code to colour the labels, please do post it - I found that quite a difficult problem to crack and I am certain I do not have an optimal solution. M23 P.S. The original clock:
    1 point
  8. UEZ

    GDI+ Image in a Tab Control

    I would do it rather this way: #include <GUIConstantsEx.au3> #include <GDIPlus.au3> Opt("GUIOnEventMode", 1) Global $NavigationBar _CreateGui() Func _CreateGUI() _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\FF.png") ;<-- your image $iWidth = _GDIPlus_ImageGetWidth($hImage) $iHeight = _GDIPlus_ImageGetHeight($hImage) $hGDIBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _GDIPlus_ImageDispose($hImage) $MainGUI = GuiCreate("Test GUI", 1000, 500) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $NavigationBar = GuiCtrlCreateTab(20, 10, 960, 480) GUICtrlSetOnEvent(-1, "_NavigationCheck") $GlossaryTab = GuiCtrlCreateTabItem("Glossary") $iPic = GUICtrlCreatePic("", 80, 200, $iWidth, $iHeight) $Item1Tab = GuiCtrlCreateTabItem("Tab 2") GuiCtrlCreateLabel("Test", 200, 200) _WinAPI_DeleteObject(GUICtrlSendMsg($iPic, 0x0172, $IMAGE_BITMAP, $hGDIBitmap)) ;$STM_SETIMAGE = 0x0172 _WinAPI_DeleteObject($hGDIBitmap) _GDIPlus_Shutdown() GuiSetState() EndFunc Func _NavigationCheck() $ReadNavigationBar = GUiCtrlRead($NavigationBar) ; Do other stuff if need be later EndFunc Func _Exit() Exit EndFunc While 1 Sleep(10) WEnd Otherwise image will be erased when switching the tabs, GUI is minimized/restored again or GUI will be moved partial outside the screen borders.
    1 point
×
×
  • Create New...