Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/06/2014 in all areas

  1. Hi there. This script is an implicit function plotter, plotting a graph that simulates a landscape. Basically, everything you see in this picture is based on implicit equations and functions. I modified the original equations a bit and added animation for the sea, a moving sun and two different kinds of lighting. Procedural Scene (only per-pixel-colors are calculated, no drawing function is used) Animated sea waves Animated sun Ambient light Directional light The animation has 60 Frames and runs @30FPS. The animation must be pre-buffered due the massive calculations done for every pixel, this takes approximately 5 minutes (get a coffee ). Here are the equations I used in the final version (don't change anythin in the script, except you want to redo all the math): Tree trunks: Light leaves: Dark leaves: Ground: Water: The Sun: Movement of the Sun: Calculation of the RGB values: If you really can't wait 5 minutes for the animation to calculate, here is a GIF (rendered with GDI+): Have fun LandScape.au3
    2 points
  2. This UDF is now part of AutoIt since 3.3.12.0. New versions of Microsoft Office have been released since the last changes were made to the Excel UDF. The new extensions (e.g. xlsx) are not (fully) supported, new functions are missing etc. The rewrite of the Excel UDF delivers changes in the following areas: Works with as many instances of Excel as you like - not just one Works with any Workbook - not just the active one Works with any Worksheet - not just the active one Only does what you tell it to do - no implicit "actions" Only one function to read from a cell or a range Only one function to write a string, an 1D or 2D array to a cell or a range Support for every file format Excel supports Speed enhancements when transferring data from/to an Excel sheet (20 - 100 times faster) 2014-03-22 - Beta 5 Known bugs None The example scripts have been tested with Excel 2010 and AutoIt 3.3.10.2 on Windows 7. You need to run the scripts with the latest AutoIt production version (3.3.10.x)! Please test with Excel 2003 and Excel 2007 and post changes you need/want to see in the next beta version! Excel Rewrite Beta 5.zip has been removed as it is now part of AutoIt since 3.3.12.0. (627 downloads) History.txt
    1 point
  3. What are you talking abut czardas?! The reason this operator is called "the ternary operator" is because it's the only ternary operator in the language. An alternative is to call it "question_mark_colon" operator, or maybe not even calling it at all.If "plus" is the only binary operator it would also be called "the binary operator". But it's not so it's called "binary operator plus" or simply fucking "plus". I used word "fucking" as modifier, not unary operator.
    1 point
  4. i found a q what i could answer.. i have hope ^^
    1 point
  5. guinness

    plink and autoit

    $aData = StringRegExpReplace($sData, '^\V+\R\V*\R', '')
    1 point
  6. Wombat, Look at GUICtrlSetResizing or the Opt equivalent - this allows the GUI to be set to whatever size you require and the controls alter size automatically. Here is an example I posted a while ago which also maintains the same aspect ratio: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; Set resize mode for controls Opt("GUIResizeMode", $GUI_DOCKAUTO) $hGUI = GUICreate("Test", 500, 300, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU)) $cButton_1 = GUICtrlCreateButton("Test 1", 10, 10, 80, 30) $cButton_2 = GUICtrlCreateButton("Test 2", 10, 50, 80, 30) GUISetState() GUIRegisterMsg($WM_SIZING, "_WM_SIZING") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_SIZING($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $wParam If $hWnd = $hGUI Then Local $iNew_H, $iNew_W Local $sRect = DllStructCreate("Int[4]", $lParam) Local $iLeft = DllStructGetData($sRect, 1, 1) Local $iTop = DllStructGetData($sRect, 1, 2) Local $iRight = DllStructGetData($sRect, 1, 3) Local $iBottom = DllStructGetData($sRect, 1, 4) ; Keep the same aspect ratio Switch $wParam ; drag side or corner Case 1, 2 ; $WMSZ_LEFT, $WMSZ_RIGHT $iNew_H = Int(($iRight - $iLeft) * 300 / 500) DllStructSetData($sRect, 1, DllStructGetData($sRect, 1, 2) + $iNew_H, 4) Case Else $iNew_W = Int(($iBottom - $iTop) * 500 / 300) DllStructSetData($sRect, 1, DllStructGetData($sRect, 1, 1) + $iNew_W, 3) EndSwitch EndIf EndFunc You can even get the font to adjust size as well by using a message handler - but you will have to wait until tomorrow if you want an example of that as I will have to strip it out of another script. M23
    1 point
  7. Too lazy to go through your script , but this works for me on Win8.1. In my experience the OS version is relevant to this kind of stuff... If RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt") Then RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "REG_DWORD", 0) Else RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "REG_DWORD", 1) EndIf Local $bOld = Opt("WinSearchChildren", True) Local $aWinListSHELLDLL_DefView = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To $aWinListSHELLDLL_DefView[0][0] DllCall("user32.dll", "long", "SendMessage", "hwnd", $aWinListSHELLDLL_DefView[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld)
    1 point
  8. Jos

    AutoIT or Sikuli

    I would have thought that the question asked was clear: Provide better/more details on what you want to do to which application. Jos
    1 point
  9. Search Send() in the help file. This topic is answered as far as I'm concerned.
    1 point
  10. iamtheky

    AutoIT or Sikuli

    Holy Shit you invented the 404? *sure edit your post and ruin my joke.
    1 point
  11. Take a look at the source of my application >SSD, where I utilize the CreateDesktop API call to run programs on a non-visible desktop. They're completely "invisible" and it seems as if windows and controls can be accessed with the usual functions.
    1 point
  12. quinch, Stop guessing and look at the code and the SciTE Help file in which you found it: In the SciTE Help file: ; Add extra files to the resources #AutoIt3Wrapper_Res_File_Add= ; Filename[,Section [,ResName[,LanguageCode]]] to be addedSo looking at the code: #AutoIt3Wrapper_Res_File_Add=C:WINDOWSMediatada.wav, SOUND, MYWAVwe see that: - Filename = C:WINDOWSMediatada.wav (what we want to hear) - Section = SOUND (hardly surprising!) - ResName = MYWAV (how we refer to the resource later) The next bit of the code: Global Const $SND_RESOURCE = 0x00040004 Global Const $SND_ASYNC = 1You see the Const bit? That indicates that the value concerned is a constant which is usually used in some form of function call - it is easier for us mere humans to understand a textual constant than a "magic number". And now we play the sound: DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", $SND_RESOURCE)Call the "winmm.dll" and ask it to run its internal "PlaySound" function on the resource known as "MYWAV" (which we set earlier) which it will find in the "SOUND" section of the resource table (because that is what the constant value means to the DLL). As I mentioned earlier, the script will pause while the sound plays. If we want it continue, we need to use the ASYNC constant as well - we use BitOR to combine them (see the Setting Styles tutorial in the Wiki to see why ). The loop just proves that the script does indeed continue: DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC)) For $n = 1 To 100 Sleep(15) ToolTip("Asynch! " & $n) NextClearer now? M23
    1 point
×
×
  • Create New...