Leaderboard
Popular Content
Showing content with the highest reputation on 09/27/2013 in all areas
-
Uploaded a new beta of SciTe containing these updates since the last production: *** Merged the updates of SciTE v 3.3.5 by Neil Hodgson with our own version of SciTE. (Jos) - Added check to avoid double shelling of the script via shortcuts of the tools menu items. - Added Properties option to set the default encoding of new files: NewFileEncoding=CodePage/UTF8/UTF8BOM/UTF16BE/UTF16LE - Fixed issue in AU3 lexer to show the last correctly when the previous line is a commentline, commentblock, Special and Directives. Cheers, Jos Ps: see initial post in the thread for details.2 points
-
Browsing a Chinese AutoIt forum, i fall on a little pearl that i want to share with you ! I have already seen water effects example with autoit, but this one is very easy to create using waterctrl.dll Only BMP are supported. Position of Blob water can be set by coordinates and mouse movements (and clicks) when over bmp create traces on water. All files are embeded in script with BinaryToAu3Kompressor. WaterEffect.au3 Hope you like it !1 point
-
Power Calculator
mLipok reacted to scintilla4evr for a topic
Hello. I want to introduce you a SIMPLE calculator made in AutoIt. Features: 3 modes: Basic, Scientific, Statistic Win7 calculator look Name from Big Bang Theory (episode 4x12) - The Suprisingly Helpful Equation-Linked Differential Optimized Numerator (The SHELDON) Here are some screenshots: Basic mode Scientific mode Statistic mode Enjoy! Now you can download it from my website: http://scintilla4evr.aq.pl/powercalculator (source will be added later) Power Calculator.zip (see changes below) Power Calculator.zip There are some errors in first code, so I give you corrected one. Error: When you write formula like this: 98 / pi ( ) it returns !error. Now it'll return 31.1943688460115. Also added "Put in clipboard" button. TODO: Skins1 point -
World Clock(s) - (by cities)
jaberwacky reacted to Rogue5099 for a topic
The main goal for me is to show the time in different locations to be able to know when to call my kids while out of their time zone. The screenshots above are 2 separate images showing either 2 or 4 clocks. This is something I wrote awhile ago and had to reuse. It's very simple in design so if anyone wants to spruce it up a bit be my guest and please share as well. Time Zone Clocks.au3 Time Zone Clocks.au3 -Added a check to make sure InputBox's are numbers -Decreased size of GUI to get rid of last line label -Changed GUICtrlSetData to ControlSetText (increased speed of Data Function) -Changed only to update Label's if different to avoid flickering -Changed AdlibRegister from 900ms to 60ms*Number of Clocks (Maybe a little more CPU usage) Time Zone Clocks.au3 -Added city code list to program -Replace InputBox's with GUI to enter city codes -Can search cities by typing in city name -Now you can input all city codes in 1 input with a comma separating them i.e. 100,200,300 -Now just double click the city in the list to add to input -Disabled editing of Input Box on starting GUI -Added Error check for no cities selected -Added AdlibUnRegister to prevent errors while closing1 point -
Or something like this? Switch EnterData() Case 0 MsgBox(1, "", "entry was 0 ") Case 1 MsgBox(1, "", "entry was 1 ") Case 2 MsgBox(1, "", "entry was 2 ") Case Else MsgBox(1, "", "entry was something else") EndSwitch Func EnterData() Return Int(InputBox("", "Enter a number between 0 and 9 :")) EndFunc ;==>EnterData1 point
-
Try this: Global $var = EnterData() Switch $var Case 0 MsgBox(1,"","entry was 0 ") Case 1 MsgBox(1,"","entry was 1 ") Case 2 MsgBox(1,"","entry was 2 ") Case Else MsgBox(1,"","entry was something else") EndSwitch ;--------------- Func EnterData() Return Int(InputBox("enter a number","Enter a number between 0 and 9 :")) EndFun1 point
-
timmy2, I would structure your code like this: If Routertest1() > 0 Then ; ping the router to see if it responds ; if first test fails, try something else If Routertest2() > 0 ; if second attempt failed tell user how to power-cycle the router If PowerCycleRouter() Then ; display a graphic about that and return to resume rest of program Else ; display a graphic about calling for help Exit ; presumably? EndIf Else ; or, if the second attempt worked, tell them the good news MsgBox(1,"Second test results","Releasing and renewing IP fixed the problem.") EndIf Else ; if the first test passed, inform user MsgBox(1,"First test results","Routertest1 passed.") EndIf ; continue with remainder of program ; functions Func Routertest1 ; Return with 0 if there was a ping response or > 0 if no response Endfunc Func Routertest2 ; Return with 0 if there was a ping response or > 0 if no response EndFunc Func PowerCycleRouter ;display a graphic about power cycling a router ;after waiting a suitable period ping the router ;Return True/False EndFunc I hope that helps. Switch/Select basically replace a whole string of If statments - does this make it any clearer? If $x = 0 Then ; ElseIf $x = 1 ; ElseIf $x = 2 ; EndIf ; ------------- Select Case $x = 0 ; Case $x = 1 ; Case $x = 2 ; EndSelect ; ------------- Switch $x Case 0 ; Case 1 ; Case 2 ; EndSwitch Personally I always go for Switch if at all possible - much clearer and easier to debug. M231 point
-
it looks like the Chrome UDF is a little underdeveloped. or maybe i am just missing something but in the FF UDF, when you add tabs it adds it to an index and you can seletc different tabs by telling it to go to a different index. i dont see anything in the Chrome.au3 about tabs or indexing besides getting elements of a page and such. hopefully it is still being worked on and it will improve. would like to see the Chrome UDF have the same functionality as the FF UDF or even more. but for now, you can try and help develop it, put your project on hold, or try a different browser that is supported fully like IE or FF. both can do what you r asking currently.1 point
-
You wonder too much . What I wonder myself is if you have forgotten how to use COM error handler. This is wrong: ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc($oError) ; Nothing EndFunc $sCallersConnectionString = "WTF" $oADO = ObjCreate("ADODB.Connection") If Not IsObj($oADO) Then Exit MsgBox(64, "", "Error creating Connection Object") $oADO.Open($sCallersConnectionString) If @error Then For $oError In $oADO.Errors ConsoleWrite("! " & $oError.Description & @CRLF) Next Else ;... EndIf This is right: $oCOMErrorObject = ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc($oError) ; Nothing EndFunc $sCallersConnectionString = "WTF" $oADO = ObjCreate("ADODB.Connection") If Not IsObj($oADO) Then Exit MsgBox(64, "", "Error creating Connection Object") $oADO.Open($sCallersConnectionString) If @error Then For $oError In $oADO.Errors ConsoleWrite("! " & $oError.Description & @CRLF) Next Else ;... EndIf Do you see the difference?1 point
-
Is that a sign of hesitation between future and torture?1 point
-
There are several possibilities in SQLite: REPLACE (equivalent to INSERT OR REPLACE) will delete a previous row conflicting with what you want to insert anew. INSERT OR IGNORE INSERT ... ON CONFLICT *** See the SQLite railroad diagrams and their comments for details1 point
-
Journalling mode Default journalling mode for disk-based DBs is "delete". This allows one writer OR multiple readers to use the DB concurrently. Journalling mode can be changed to WAL mode by issuing a pragma (persistent setting, needs only be done once). Then this DB will deal with one writer AND multiple readers concurrently, provided the DLL(s) used to access it is/are recent enough (>= v3.7.0). No DB engine supports multiple concurrent writers (literally), that would break the underlying relational model and the ACID properties (whatever that means). Writes need to be serialized somehow. Unlike most engines, SQlite is ... Lite! That means there is no centralized server where serialization can take place. Instead, concurrent applications use several flavors of file locking to maintain isolation betweens readers and successive writers. Having applications with several writers is in fact not hard, but needs some thinking. The trick is to overestimate the longer duration of the worst case sequence of worst case transactions and use that as timeout. In practice, keep transactions reasonably sized and use some ridiculous value for timeout (on every DB connection), like 5 minutes. If the DB doesn't go out of busy state for that long (forever in terms of everyday's PC applications), then you have a pending operation which you need to deal with otherwise. Wrap operations inside transactions when needed. Wrap bulk inserts or updates in transactions as well.1 point
-
JohnOne, No, sqlite3.exe is not needed at all in fact. It is simply a portable reference implementation as command-line tool but in practice, programs use either a shared library (.dll or .so or whatever depending on OS) just like AutoIt, or embed it by linking to the library object module (a flat C source). The example pointed out above is simple. Depending on the nature, format, size of the data you want to share you may need a more appropriate design. I'd be happy to help anyway. The real magic is that you can have up to one writer and multiple readers concurrently using a given SQLite database, thanks to the WAL journalling mode. That's pretty good concurrency with simple source. The C side is very easy too. I'll point you to some simple example but I need to move right now... Stay tuned1 point
-
Use absolute cell references: =A:A*$P$11 point