Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. Yeah! Nice Idea! Thanks you again! Awesome as always See ya around @TheSaint Oh , I will try to locate it... TD
  2. @kcvinu You can use a dummy control for the purpose M23 mentioned
  3. Do you think that I use a input box to let the user input anything? . I was taking precautions when the user *manually* edits the .ini file (preventing the program from suffering an ugly crash )
  4. @Melba23 I think I pointed it out in post #8 and you corrected your "flaw" in post #9 @JohnOne Ok, I will try to reduce the amount of smileys in my posts and start inserting something other than them as @boththose suggested... @guinness I might just stick to AutoIt, PHP is not my thing really (The main thing which I am concerned in PHP is performance because the script runs on a single server and a single script can be executed a thousand times, so god knows how the server feels, poor server ). Nice representation of (my) life through that PHP snippet, I have to agree that PHP isn't an eye-candy language... TD
  5. I prefer using the built-in UDF _FileListToArray! #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; List all the files and folders in the desktop directory using the default parameters. Local $aFileList = _FileListToArray(@DesktopDir, "*") If @error = 1 Then MsgBox($MB_SYSTEMMODAL, "", "Path was invalid.") Exit EndIf If @error = 4 Then MsgBox($MB_SYSTEMMODAL, "", "No file(s) were found.") Exit EndIf ; Display the results returned by _FileListToArray. _ArrayDisplay($aFileList, "$aFileList") EndFunc ;==>Example ; Copied from help file :P
  6. @M23 Yeah I know that , I was just indicating the flaw, Don't Jump On Me
  7. @JohnOne I would love to , OK, Lets consider some things before we start: We are reading a key from a settings.ini file, In other (normal) terms, we are reading the user's preference on the mentioned option (speed of console actually, I can't explain it ). We need to set the appropriate value to the appropriate variable in order to make our program work , We use Switch...EndSwitch for this purpose, this is where we waste a line by setting the default setting, the default setting is the same as the 'normal speed' setting , So if you use something like: Case "normal", Else $g_iSettings_TypingSpeed = $CONSOLE_SPEED_NORMALThen we can save the line and looks neat too ! Hope you may understand . @orbs Do you mean something like this?: Case Else ; Else replaces 'normal' $g_iSettings_TypingSpeed = $CONSOLE_SPEED_NORMALYeah it works but it does pose some difficulty to the reader of the code to understand it @Melba23 Nice little sneaky idea , Yeah it solves my problem It would not work (referring to the second solution), What if the value of 'speed' is 'bugfinder'? $g_iSettings_TypingSpeed would be empty and my program would crash But Still! I am not leaving my suggestion behind , I want to see if others find it useful (if my proposal *is* implemented) P.S Reply storm
  8. Here is a genuine snippet from my program which clearly demonstrates the problem: Global Const $g_esSettingsFile = @ScriptDir & '\settings.ini' Global Const $CONSOLE_SPEED_INSTANT = 1 ; Not the actual values from my project :P Global Const $CONSOLE_SPEED_SLOW = 2 Global Const $CONSOLE_SPEED_NORMAL = 3 Global Const $CONSOLE_SPEED_FAST = 4 Switch IniRead($g_esSettingsFile, "console", "speed", "else") Case "instant" $g_iSettings_TypingSpeed = $CONSOLE_SPEED_INSTANT Case "slow" $g_iSettings_TypingSpeed = $CONSOLE_SPEED_SLOW Case "normal" $g_iSettings_TypingSpeed = $CONSOLE_SPEED_NORMAL Case "fast" $g_iSettings_TypingSpeed = $CONSOLE_SPEED_FAST Case Else $g_iSettings_TypingSpeed = $CONSOLE_SPEED_NORMAL ; Same as normal EndSwitch #cs ----------- Contents of settings.ini ----------- [console] speed=fast ; Fast is my preference ;) #ce ----------- Contents of settings.ini ----------- ; Save the contents as settings.ini at your Script's Directory :)I am a little confused though, TD P.S My RSS Reader broke
  9. Hello friends , I was working on my project today and got a wild idea with Switch..EndSwitch statements, it looks like this: #include <MsgBoxConstants.au3> $iWildInteger = 10 Switch $iWildInteger Case 1 MsgBox($MB_OK, "AutoIt Forums", "The value of $iWildInteger is " & 1 & '.') Case 2, Else MsgBox($MB_OK, "AutoIt Forums", "The value of $iWildInteger is " & 2 & ' or else.') EndSwitchA case with Else and another value... I tried it but It didn't work , I think its great to have a feature like this so that I don't have to have a separate case for it Please note that this is *NOT* a feature request , This is a poll for opinion on this feature (before making a feature request in the BT ), Vote wisely, TD
  10. ...After a second thought, where is MsgBoxConstants.au3 included!? Then I discovered its in GuiButton.au3 -> WinAPI.au3 Just a FYI, TD
  11. Nice explanation , I tried to search for $idCancel but I guess the search is case-sensitive, It explains all the contradictions I was right about making a topic before opening a bug report TD
  12. Maybe his "infinite" loop isn't a GUI loop?
  13. Hello, I think I have encountered a bug in AU3Check... Here is the code with the bug: #include <GuiButton.au3> Local $idCancelI get a "error: $idCancel previously declared as a 'Const'." when I run the code on line no. 3, here is the SciTE Console Log: So, Is this a bug? Thanks in Advance, TD
  14. I guess the "bit" is the problem, I am using 64-bit Win 8.1
  15. @GordonFreeman Did you try it? it does not work for me
  16. @Luigi Yes I am happy to see people discovering new things with maps! Keep up the good work guys!
  17. TheDcoder

    AuPad

    Good job, It has all the basic functionality + some extra options I am giving it 4 stars, requires a little cleanup in the code side...
  18. Thanks alot @ahmet! , This code works for me: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIEdit.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 393, 130, 192, 124) $Input1 = GUICtrlCreateInput("", 88, 48, 209, 21) _GUICtrlEdit_SetCueBanner($Input1, "Semi-transparent text AKA Cue Banner!!!", True) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndTD
  19. @Jos I think he means something like this: Local $oObject $oObject = ObjCreate("shell.application") ; SciTE will detect that this is a object by this line Local $oNotAnObject = "" ; SciTE will no detect this as an object
  20. Hello! , I was wondering if something like this: is possible to in AutoIt? The search text will disappear ASA the user types a letter in the input box... Is it possible? How? Here is some code for you to work on: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 393, 130, 192, 124) $Input1 = GUICtrlCreateInput("", 88, 48, 209, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thanks in Advance, TD P.S ASA = As soon as Are you wondering about the image which I provided above? I made it with a very careful forgery
  21. @MikahS I suggest you change your code for: Case $au3help $au3Help_Seltext = _GUICtrlRichEdit_GetSelText($pEditWindow) ; get any selected text Run(@ProgramFilesDir & "\AutoIt3\AutoIt3Help.exe " & $au3Help_Seltext)TD
  22. , This is like a skin for a GUI... Awesome! Now, I know that I don't need to code my own CSS to make my website beautiful Thanks for sharing, TD
  23. @esullivan ¯\_(ツ)_/¯
×
×
  • Create New...