Leaderboard
Popular Content
Showing content with the highest reputation on 06/10/2013 in all areas
-
New MVPs
DigitalFacade82 and 4 others reacted to Melba23 for a topic
In case anyone had not noticed, I am happy to announce that we have three new MVPs: PhoenixXL, FireFox and kylomas. I am sure you will all join in with my hearty congratulations to them all. M235 points -
Organize Includes in SciTE4Autoit3
MrCrackR reacted to Xenobiologist for a topic
Hello everybody, many languages like Java have got a little helper tool in their IDE, which cares for the right import/include statements. The helper tool adds the necessary lines for including the needed libraries(or UDFs). This script organizes the includes for AutoIt and it can be added to SciTE4Autoit3 very easily. Getting started? 1) Extract the zip here (ProgramsDIR) ..AutoIt3SciTE 2) Open SciteUser.properties You'll find the file here : @DocumentsDirUSER or via SciTE menu --> [ Options --> Open User Option File ] Add these lines to add OrganizeIncludes to the SciTE menu. # 36 OrganizeIncludes #command.36.*.au3="$(autoit3dir)\beta\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OI_1.0.0.50.au3" "$(FilePath)" command.36.*.au3="$(SciteDefaultHome)\..\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OI_1.0.0.50.au3" "$(FilePath)" command.name.36.*.au3=OrganizeIncludes command.save.before.36.*.au3=1 command.is.filter.36.*.au3=1 command.shortcut.36.*.au3=Ctrl+Shift+Alt+I If the Autoit3 exe is not found then replace this variable $(autoit3dir) by the correct path. command.36.*.au3="$(autoit3dir)autoit3.exe" "$(SciteDefaultHome)OrganizeIncludesOI_1.0.0.50.au3" "$(FilePath)" command.36.*.au3="c:ProgrammeAutoit3autoit3.exe" "$(SciteDefaultHome)OrganizeIncludesOI_1.0.0.50.au3" "$(FilePath)" 3) DONE Starting the script by hitting CTRL+SHIFT+ALT+I in Scite, it shows you what include files you need and which you do not need. There is also a helpfile in the zip-file which shows all settings. Old version download ~ 3000!!! THANKS!!! Old versions thread Thanks for every comment/idea! Mega OrganizeIncludes.zip1 point -
This started from the Uten's Scintilla example, but I added some functionality to it. Now it looks like Notepad. And the most important - it has SYNTAX HIGHLIGHTING for: *.au3,*.bat;*.cmd;*.html;*.htm;*.php;*.properties;*.ini;*.inf;*.reg;*.url;*.cfg;*.cnf;*.aut.... more are comming.... - you can define your own styles for the highlighter - shows Line numbers - has Code folding - find/replace with regular expressions The SciLexer.dll MUST be in the PATH or in the script dir. You can download it from The latest version is here http://scintilla.sourceforge.net/ Screenshots: INI Highlighter, AU3 Highlighter, PHP Highlighter Here is the script: Update 07.02.2007:sciteit.au3(previous downloads: 66) - completed the find/replace functions (regular expressions are supported) This file is also required:scintilla.h.au3 (this is Scintilla.h converted to au3 format) The highlighters style definitions: highlighter.au3.txt - for AU3 files highlighter.bat.txt - for BAT files highlighter.html.txt - for HTML/PHP files (It is not fully complete, but works for PHP/HTML) highlighter.ini.txt - for INI/INF/CFG/PROPERTIES files highlighter.txt.txt - for plain text1 point
-
this example script is the result of several threads, among others: '?do=embed' frameborder='0' data-embedContent>> '?do=embed' frameborder='0' data-embedContent>> '?do=embed' frameborder='0' data-embedContent>> . [screenshot] . the script uses the GDIPlus v1.1 functions to manipulate images in a picture control. winxp users can also run it with the instructions posted ?p=1079657'>here. a special GDIPlus_StartUp function is used. it solves several problems in handling and combining graphical effects, color matrices, color transformings, balances, levels and attributes simultaneously on an image in a normal pic control, and additionally convolution matrices, embossing and edge detections. . taken down. maybe this can be further developed into a real autoit image editor. here is a nice example pic, if you need one. i borrowed it from >here. . . if you want the 41 convolution effects, you need the excellent Fasm.au3 (flat assembler) by Ward >here. download the entire zip file, because it needs the included MemoryDll.au3 as well. if you don't, you can comment out the line #include <Fasm.au3>, but you will miss a lot of fun. without his assembler, the convolutions wouldn't be possible in a reasonable speed. also credits and thanks to Authenticity for his incredible Convolution.au3 >here. you don't need to download it, because i integrated it to my script. have fun Edano Edit 1: added gamma, zoom, load, save Edit 2: updated __GDIPlus_Startup() Edit 3: added Convolution Matrix effects Edit 4: improved zoom and some other features Edit 5: added color matrices, color balance and tint effects Edit 6: added HSL/HSB, color levels and greyscale with filters1 point
-
Yes, in MMa, N[<expr>, x] internally works its way thru <expr> to give you at least x decimal digits accuracy. In fact there is a whole set of precision and accuracy parameters than you can tweak to achieve the desired goal with confidence. It's no big surprise that a monster like Mathematica has unmatched features to deal with overly complex or uncommon precision-hungry expressions, at least compared to a generic language where these complexities are not the main features nor the expected highlights. Nonetheless Haskell still has a pretty good arbitrary precision library for what it is and for the tasks you can expect it will do well. A top-notch CAS (computer algebra system) is required to embark an unbelievable set of both low-level and high level functions, optimizations and dedicated features that general-purpose software can't afford to mimic. Have a look for example at the incredible Wolfram Demonstration Project to see that Mma includes not only pure math abilities but also offers high-end graphics, sounds, databases support, distributed computation, ... My personal opinion about the Mathematica language itself is that even if it lacks some features Haskell has built-in (e.g. laziness + filters) it is more versatile and consistent from the ground up: everything being a list makes functional programming more systematic. There are no FP operators acting on tuples of integers only or such. Head and tail of an empty list are indeed emty lists and don't generate exceptions. Some web pages are doing a side by side comparison Mma vs Haskell and decide that Mma is slower on this and that algorithm. It's trivial that an interpreted language can hardly compete in speed with a compiled language. OTOH you can still emit C code with a paid version of Mma for any notebook, then speed is fairly comparable if not faster. Mma also has built-in support for massive GPU computations (both OpenCL and CUDA) which few languages have out of the box. Finally you can still use the power of MathLink to use the computing power of a remote supercomputer (or clusters of such) and have the result in almost real-time in your Mma notebook. I love unique features like up-values and down-values of functions, efficient sparse matrix operations, rules and patterns, built-in debugging and so much more. Mathematica offers all the programming paradigms I can dream of, which I can freely intermix when I need to. I told you I was a big fan!1 point
-
Slider control - jump to next tick
abberration reacted to UEZ for a topic
Here a another way using windows messaging. #include <GUIConstantsEx.au3> #include <GuiSlider.au3> #include <WindowsConstants.au3> #include <GuiSlider.au3> #include <GuiEdit.au3> Global $TicArray[7] = [0, 5, 30, 50, 70, 90, 100] Local $oldpos = MouseGetPos(0) ; Create GUI $hGUI = GUICreate("Slider Set Tic", 400, 296) $iSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_BOTH, $TBS_ENABLESELRANGE)) $hSlider = GUICtrlGetHandle($iSlider) $edit = GUICtrlCreateEdit("--", 50, 50) GUISetState() _GUICtrlSlider_ClearTics($iSlider) ; Set Tics ArrayTicks($TicArray, $iSlider) Global $iSliderPos = 0, $iPos = 0, $iPosOld = -1, $bUpdate = False GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ;~ Case $iSlider ;~ While $iSlider ;~ Local $mPos = MouseGetPos(0) ;~ If $oldpos < $mPos Then ;~ _GUICtrlEdit_SetText($edit, "moving right") ;~ ;$oldpos = $mPos ;~ ;ExitLoop ;~ ElseIf $oldpos > $mPos Then ;~ _GUICtrlEdit_SetText($edit, "moving left") ;~ ;$oldpos = $mPos ;~ ;ExitLoop ;~ EndIf ;~ Sleep(250) ;~ $oldpos = $mPos ;~ ExitLoop ;~ WEnd EndSwitch WEnd Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local $i, $c, $d = 0xFFFFFF, $p Switch $lParam Case $hSlider $iPos = _GUICtrlSlider_GetPos($hSlider) For $i = 0 To UBound($TicArray) - 1 $c = Abs(1 - (($TicArray[$i] + 1) / ($iPos + 1))) If $c < $d Then $d = $c $p = $i EndIf Next _GUICtrlSlider_SetPos($hSlider, $TicArray[$p]) EndSwitch Return "GUI_RUNDEFMSG" EndFunc ;==>WM_HSCROLL ; Create array tics Func ArrayTicks($array, $CurrentSlider) Local $iMax = UBound($array), $i For $i = 0 To $iMax - 1 _GUICtrlSlider_SetTic($CurrentSlider, $array[$i]) Next EndFunc ;==>ArrayTicks I know that the arrow keys are not working this way. Maybe I will find a solution for this... Br, UEZ1 point -
Keniger, This is the only way I know how to remove the border - create a child GUI and put the button inside it: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xFFCCCC) GUISetState() $hGUI_Button = GUICreate("", 80, 30, 10, 10, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $cButton = GUICtrlCreateButton("Test", -1, -1, 82, 32) ; 2 pixels bigger than the GUI GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton MsgBox(0, "Hi", "Button pressed") EndSwitch WEnd I hope that helps. M231 point
-
School project, Checkbox / enable function.
D4rkDr4g0nz reacted to Melba23 for a topic
D4rkDr4g0nz, No harm done. M23 P.S. And it does not matter one whit if the game's author gave you permission - our rules are our rules, not his.1 point -
School project, Checkbox / enable function.
D4rkDr4g0nz reacted to Melba23 for a topic
D4rkDr4g0nz, If you do point your classmates here, please also point them at the Forum rules (there is also a link at bottom right of each page). We would not want them getting off on the wrong foot like someone we could mention, would we? M231 point -
School project, Checkbox / enable function.
D4rkDr4g0nz reacted to BrewManNH for a topic
Or something like this, just don't put a While loop in the function ProxOn because it will disable your GUI controls until you exit the function. #include <misc.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $Form1 = GUICreate("Proxy", 429, 420, 192, 124) GUISetBkColor(0x646464) Global $Checkbox1 = GUICtrlCreateCheckbox("Enable / Disable", 40, 320, 121, 17) Global $Label1 = GUICtrlCreateLabel("use the checkbox to enable / disable the proxy", 0, 384, 422, 17) Global $Button1 = GUICtrlCreateButton(" Pointless Button ", 168, 312, 75, 25) Global $Label2 = GUICtrlCreateLabel("Warning :", 248, 312, 112, 17) Global $Label3 = GUICtrlCreateLabel("Pointless.", 248, 328, 97, 17) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $Checkbox1 If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetData($Checkbox1, 'Enabled') ProxOn() Else GUICtrlSetData($Checkbox1, 'Disabled') Proxoff() EndIf Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() Exit Func ProxOn() $var = 1 ConsoleWrite('Proxy is on' & @CRLF) EndFunc ;==>ProxOn Func Proxoff() $var = 0 ConsoleWrite('Proxy is off' & @CRLF) EndFunc ;==>Proxoff1 point -
Hello Water, I am working on this issue, too. I found this code can print PDF file to default printer directly, really quick and convenient. ============================= shellexecuteWait($PDFFileURL,"","","print") ============================= wondering how to close adobe reader window after printing.1 point