Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/14/2015 in all areas

  1. trancexx

    Ribbon

    Few years ago Microsoft introduced new UI feature that they named Ribbon. With the release of Windows 7 they added it as standard system feature. Windows Ribbon framework. You could say it's a new technology waiting to be fully embraced. Considering AutoIt is currently in some shitty stage Ribbons are not expected to be supported natively. Which is actually good thing because otherwise some developer could have GUICtrlCreateRibbon idiotic idea. Ribbons are beautiful things. In order to work with them you have to master objects. It's COM based technology. Some people will stop reading now, but really their shame. Anyway, this example is based on work by Mr. Michael Chourdakis. Guy really took deeper dive to ribbon thematic and made few very interesting articles. All is available on internet naturally, just google Michael Chourdakis Ribbon or something like that. So, the main thing to do is create so called Ribbon Framework Object. After that you have to initialize event handlers (two callback objects made with ObjectFromTag function) and load your Ribbon. Ribbon is loaded from resource, either one of your app or some other. I have compiled resource dll for this example so that scripts could be run non-compiled and still use ribbon command bar. Example shown here is not completely dummy, it uses all of the ribbon controls. Only it doesn't do anything smart besides that. ZIP: Ribbon.zip Inside the zip there is folder called Ribbon with two files RibbonExample_NEW.au3 and RibRes.dll. Extract that folder somewhere, run RibbonExample_NEW.au3 and enjoy the Ribbon beauty. There are few comments inline for easier comprehension of the overall script code. Thanks Andreik for asking for more.
    1 point
  2. Melba23

    Wannabee Mods

    Hi, A number of recent threads have degenerated into discussions between no doubt well-meaning members over the legality of the question asked - such spats are both unseemly and unnecessary. If you have not already noticed, there is a Moderation team charged by the site owner with keeping the site running smoothly in accordance with his wishes - so please leave the decisions to them. If the question is obviously illegal, then perhaps the first responder might point at the Forum rules as well as reporting the thread so that normal moderation action can be taken. But if there is any doubt, please still report the thread, but do NOT get involved in pointless discussions as to whether or not it is allowable - the Moderation team will make the final decision and will not be swayed by any other opinions, so save the wear on typing fingers and keyboards. In particular, if a Moderation team member has already posted permitting the thread to continue, it is completely out of order for a third party to post again questioning the decision - from now on this will be regarded as an unfriendly act and is likely to attract sanctions upon the wannabee-Mod. If there is really a burning need to discuss the matter further, please do so by PM - the Moderation team do not bite and are open to reasoned debate. M23
    1 point
  3. UEZ

    how plot a circle in Array?

    Why on hell do you want to "draw" into an array? Anyhow, here we go: #include <Array.au3> Global Const $fPi = ACos(-1), $fD2R = $fPi / 180 Global $aGfxArray[21][21] DrawEllipseToArray($aGfxArray, 10) ;full ellipse _ArrayDisplay($aGfxArray, "full ellipse") Global $aGfxArray[21][21] DrawEllipseToArray($aGfxArray, 10, 90, 270) ;half ellipse _ArrayDisplay($aGfxArray, "half ellipse") Global $aGfxArray[21][21] DrawEllipseToArray($aGfxArray, 10, 90 - 45, 270 - 45) ;inclinade half ellipse _ArrayDisplay($aGfxArray, "inclinade half ellipse") Func DrawEllipseToArray(ByRef $aArray, $iRadius, $iStartAngle = 0, $iEndRadius = 359, $iColor = 0xFF00FF00, $iColor_Center = 0xFFFF0000) Local $d, $iW2 = Int(UBound($aArray, 2) / 2), $iH2 = Int(UBound($aArray, 1) / 2), $iX, $iY For $d = $iStartAngle To $iEndRadius $iX = Round($iW2 + Sin($d * $fD2R) * $iRadius, 0) $iY = Round($iH2 + Cos($d * $fD2R) * $iRadius, 0) $aArray[$iY][$iX] = $iColor Next $aArray[$iH2][$iW2] = $iColor_Center EndFunc Pay attention to the function DrawEllipseToArray - it has no error checks!
    1 point
  4. _HotKey("w") _HotKey("a") _HotKey("s") _HotKey("d") _HotKey("x") Func _HotKey($hotkey = "") Switch @HotKeyPressed Case "w" Send("{up}") Case "a" Send("{left}") Case "s" Send("{down}") Case "d" Send("{right}") Case "x" Exit 0 * MsgBox(64 + 262144, Default, "Exit", 1) Case Else If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed) If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.") EndSwitch EndFunc ;==>_HotKey While Sleep(100) ; here should be your application. WEnd ; meanwhile, here is a dummy loop.
    1 point
  5. As you didn't explain just what you're trying to do, I assume you are looking for general suggestions. So I give you one that I wrote for a helpdesk person that was continually asking me questions without searching for himself: $input = InputBox( "Every answer to every question - Ever", "Please enter type in your question." ) ShellExecute ("http://www.lmgtfy.com/?q=" &$input)
    1 point
×
×
  • Create New...