Leaderboard
Popular Content
Showing content with the highest reputation on 01/10/2013 in all areas
-
Why, you use MY function, of course. Edit: Different tools for different jobs.2 points
-
Windows Desktop Dimmer / Shade Are your eyes being blinded by the bright white light leaping from your screen and burning your retinas out? Yeah, so were mine. So I looked for ways to adjust this, but each thing had its limitations. - LCD brightness adjustments: Yes, this is the obvious choice. But there's two problems: The monitor emits a high pitched noise (common with LCD dimming) In different scenarios, brighter is better (games, movies). And what a pain to constantly adjust! - Graphics Card software adjustments: Pain in the ass, often inconsistent, and might ruin contrast, wash out colors, or otherwise not give the results you want. Its even more of a pain when dealing with more than one monitor. And again - see #2 above. So what other option is there? Well, there's this novel idea of using a desktop dimmer 'window' - basically a click-through full-screen GUI that is fully transparent - thus altering the screen colors. I got this idea from this Android app called 'Screen Filter'. I had explored the idea with this very basic test code: ; Styles: Basic: WS_POPUP (0x80000000), Extended: WS_EX_NOACTIVATE 0x08000000, ; $WS_EX_TOOLWINDOW (0x80) + $WS_EX_TOPMOST (0x8)? + $WS_EX_TRANSPARENT (click-through) $hGUI=GUICreate("",@DesktopWidth,@DesktopHeight,0,0,0x80000000,0x08000080 + 0x20) WinSetTrans($hGUI, "", 110) WinSetOnTop($hGUI, "", 1) GUISetBkColor(0x141414) WinSetState($hGUI, "", @SW_SHOWNOACTIVATE) Sleep(5000)This worked well when put inside a 'real' AutoIt script. However, there was a constant issue revolving around windows stealing the top-most attribute, thus causing them to hover 'above' the desktop shade. So (as you'll see from the posts below), we created workarounds by resetting the top-most flag. But that made things a bit, well, ugly. A number of people tried to come up with methods that tried to solve this problem - and really, its an interesting read, so check out the posts that follow. The thing is, everybody ran into the same losing-topmost status problem.. UNTIL, that is, lorenkinzel came in and> posted a script that surprised us all Dimmer Control / Tray Menu Turns out one easy API call was all it took to adjust the screen brightness. No fancy Desktop Shade GUI's were needed. So, KaFu took it one step further by developing a simple GUI, and I made some adjustments (see above pics), implemented some fixes, and the rest is history. We now have a nice 'Windows Desktop Dimmer' program that I find to be a must-have addition to my Windows toolbox. Ah, and I should mention the neat '>Windows Focus' GUI that was developed by KaFu in response to my '>Active Window Dimmer' script. Mine simply dimmed the active window, while KaFu's dimmed everything BUT the active window. This creates a cool movie-theater or focus-writer effect that I find actually compliments the Windows Dimmer. *UPDATE: See '>Spotlight + Focus GUI' script for some new eyestrain-relieving experiments! And check out RedShiftGUI for even better ideas for eyestrain relief! So, with all that said, I might as well post the whole package of scripts together as one ZIP. Use just the Windows Dimmer, or mix together different scripts for some funky effects! (see the attachment below) Oh, one more thing, just to clear up the context of post #2: it had to do with a question I had regarding any theories or common practices used to adjust brightness without losing contrast or details. WindowsDimmerShadeAndFocus.zip [previous downloads: 137] Changelog: 2013-05-14 + Added _GraphicsIsGammaRampSupported() function which checks if the graphics device supports Gamma Ramps (used by WindowsDimmer.au3). + Small speedup of DLLCalls1 point
-
Download IniVirtual.7z (v0.6 20.07.2013) _IniVirtual_Delete _IniVirtual_Initial _IniVirtual_Read _IniVirtual_ReadSection _IniVirtual_ReadSectionNames _IniVirtual_RenameSection _IniVirtual_Write _IniVirtual_WriteSection _IniVirtual_Save _IniVirtual_IsDuplicateSections _IniVirtual_IsDuplicateKeys Converts the ini-file into an array and work with it in memory. Upon completion, you can save the file. There is no limitation section 32767 characters. If the beginning or end of the value is space, the value in quotes. For compatibility with version 3.3.10.2 (and 3.3.11.4), at the beginning of each regular expression add (*LF) Alternative: >IniVirtualSPE (AZJIO) >IniEx (DXRW4E) >IniString (ResNullius & MrCreatoR (G.Sandler)) >discussion1 point
-
The picture shows Rubik's Cube in the middle of a rotation, wherein the layer is rotated 90 degrees. New version for AutoIt 3.3.10 The scripts were flawed. Fixed in this update. 08-01-2013: First post In the Cubes menu there are six cubes from 2*2*2 to 7*7*7: Pocket Cube, Rubik's Cube, Rubik's Revenge, Professor's Cube, V-Cube 6 and V-Cube 7. See http://en.wikipedia.org/wiki/Rubik's_Cube. The Scramble menu scrambles the cube. In the input field in the statusbar you can set the number of scramble steps. The Solve menu automatically solves the cube. In this version it just plays back the undo log. The Build menu shows how the cubes are created. It also shows how the rotation of a layer is simulated. The Scramble, Solve and Build menus puts the program into a Scramble, Solve and Build mode. To leave the Scramble and Solve modes click the menu once more. To leave the Build mode uncheck the menu. The program mode or state appears in the statusbar. See the Help menu for more information about the menus. Rotating a layer in the cube Click an edge of the layer with the left mouse button and hold the button downMove the mouse in the direction you want to rotate the layerRelease the left mouse buttonThe rotating layer in the picture has probably been clicked somewhere on the blue edge. You can't rotate a layer in Scramble, Solve and Build modes. The mouse buttons can be switched in the Options. Rotating the entire cube Click in the window with the right mouse button and hold the button downMove the mouse in the direction you want the cube to rotateRelease the right mouse buttonThe description of the mouse rotations can be found in the Help menu. Using the keyboard Use the arrow keys or <A,a>, <W,w>, <S,s>, <Z,z> to rotate the cube. Use <Home> or <H,h> to place the cube in the start position. Use <Page Up> or <I,i> and <Page Down> or <O,o> to zoom in and out. Use Num 1-6 or 1-6 to show the 6 sides of the cube. The program Inspiration for the program is from this site: http://rubiksim.sourceforge.net/. The graphics is generated with old style OpenGL 1.1. Some OpenGL globals and functions are copied from this thread http://www.autoitscript.com/forum/index.php?showtopic=83581 by trancexx. Especially globals and functions for creating an OpenGL window and a rendering context. Zipfile The zipfile contains a number of files: RubiksCube.au3 - GUI and main loop, run this fileMenuFncs.au3 - implements the menu systemMenuWins.au3 - creates menu system windowsKeyboard.au3 - code for shortcut keysOGLconsts.au3 - OpenGL constantsOGLfuncs.au3 - OpenGL functionsCubes.au3 - creates the cubesTurnLayer.au3 - rotate a layerRotateCube.au3 - rotate the cubeScramble.au3 - scramble functionSolveCube.au3 - solve functionsBuild.au3 - build functionsUtilities.au3 - calculations(The files are edited with Notepad++ with a tabwidth of 2. This doesn't match the default settings in Scite.) 21-01-2013: Update #1 Fixed some errors in the Build menu. Added a log to see the colors of all sides at one time. See picture in post #5. RubiksCube3.3.10.7z Testet on XP 32 bit and Win 7 32/64 bit. Previous versions for AutoIt 3.3.81 point
-
Are you telling us you are not qualified to do the job you are paid for? Please post the code you have tried, and someone who knows about excel may be able to help you with it.1 point
-
Here's an example from my Update Mp3 Artwork program, which I use at the click of a CASE button for the Track Title (ID3 Tag) field. In the Settings window, is another CASES button that allows editing the following text file in Notepad. Cases.txt Here's the simple code I use to process it, remembering that I code with speed not perfection ... for personal use only. I do my programs like I needed them yesterday, which in most cases I do. Func CaseFile($tagtxt) If FileExists($casefle) Then $lines = _FileCountLines($casefle) If $lines > 0 Then $file = FileOpen($casefle, 0) For $l = 1 To $lines $line = FileReadLine($file, $l) If StringLeft($line, 1) <> ";" Then $part = StringSplit($line, "|") If $part[0] > 1 Then If StringInStr($tagtxt, $part[1]) > 0 Then If $part[0] = 2 Then $tagtxt = StringReplace($tagtxt, $part[1], $part[2]) ElseIf $part[3] = "query" Then $ans = MsgBox(262177, "Confirm Case Change or Replacement", _ "Change --> " & $part[1] & @LF & _ "To --> " & $part[2] & @LF & @LF & _ "NOTE - This will apply to every instance." & @LF & @LF & _ "Do you want to proceed?", 0) If $ans = 1 Then $tagtxt = StringReplace($tagtxt, $part[1], $part[2]) EndIf EndIf EndIf EndIf EndIf Next FileClose($file) EndIf Return $tagtxt EndIf EndFunc ;=> CaseFile Very simplistic for sure, but does the job well, and fast enough processing for my needs. NOTE - Because I manually transferred the code from my other PC via a text file, all the tabbing got lost when I pasted here, so I've manually & painfully spaced everything. Which appears to gradually get lost after every edit I do.1 point
-
1 point
-
teach ...fish ... etc etc1 point
-
Global $meal = "Evening" Switch @HOUR Case 01 To 07 $meal = "Closed" Case 08 To 10 $meal = "Breakfast" Case 11 To 15 $meal = "Lunch" Case 16 To 19 $meal = "Dinner" EndSwitch MsgBox(262144, " ", @HOUR & ":" & @MIN & @LF & @LF & $meal, 5)1 point
-
Button function not working out for me!
fanna1119 reacted to stormbreaker for a topic
#include <ButtonConstants.au3> #include <Constants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include 'MyIPConfig.au3' $Form1 = GUICreate("A problem to solve", 150, 150) $btn = GUICtrlCreateButton('IP Info', 10, 10, 90, 30, $BS_BITMAP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $btn _Button_Function() EndSwitch WEnd Perhaps, this is the ans. to ur question. Here is the modified version of your posted file. #region ---Au3Recorder generated code Start (v3.3.7.0) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- Func _Button_Function() Run('C:\Windows\System32\cmd.exe') _WinWaitActivate("C:\Windows\System32\cmd.exe","") Send("ipconfig{ENTER}") MouseClick("right",14,55,1) MouseClick("left",68,73,1) _WinWaitActivate("Mark C:\Windows\System32\cmd.exe","") MouseMove(13,52) MouseDown("left") MouseMove(635,306) MouseUp("left") _WinWaitActivate("Select C:\Windows\System32\cmd.exe","") Send("{Enter}") Run('C:\Windows\System32\notepad.exe') _WinWaitActivate("Untitled - Notepad","") Send("{CTRLDOWN}v{CTRLUP}") EndFunc #endregion --- Au3Recorder generated code End ---1 point -
hm... it should work. Can you try this simple test? check if the value is correctly read and assigned : NB: check also if the memory address type is 4bytes. $hOpen = _MemoryOpen(ProcessExists("calc.exe")) ConsoleWrite(_MemoryRead(0x00393F3C, $hOpen, "dword") & @CrLf) _MemoryWrite(0x00393F3C, $hOpen, 12345, "dword")Br, FireFox.1 point
-
It's impossible to fix all the user's mistakes, and a large database of abbreviations isn't a particularly watertight solution. If you plan on capitalizing a long list of titles, there will nearly always be some inconsistancies, whatever method you choose. If the method parses over 95% of international names correctly, that's got to be worth the effort. Also if you happen to know which abbreviations are present, you can simply run StringReplace afterwards. Edit The next post is very much to the point. If you want to fix bbC, then use tcurran's _StringChooseCase1 point
-
I prefer the Default keyword over using -1 to indicate a default parameter. Default is classed similar to False. SomeFunc(Default) SomeFunc(True) SomeFunc(False) Func SomeFunc($fVar = Default) If $fVar Then MsgBox(4096, 'Param: ' & $fVar, 'This is True') Else MsgBox(4096, 'Param: ' & $fVar, 'This is False') EndIf EndFunc ;==>SomeFunc1 point
-
Thanks for posting.1 point
-
1 point