-
Posts
7,093 -
Joined
-
Days Won
88
Community Answers
-
TheDcoder's post in ISN AutoIt Form Studio 2 Broke was marked as the answer
I solved the problem myself, Its my mistake that I changed "GUI Grid" Value to 0
Solution:
1. Open "C:Users<USERNAME>DocumentsISN AutoIt StudioDataPluginsformstudio2settings.ini"
2. In settings.ini:
[settings] sizelimit=X raster_size=0 <<<<<<<<<<< Change 0 to any number except 0 (4 is recommended) spacing_distance=X raster=X repos=X draw_grid=X showdocklines=X 3. Open ISN Studio & Check If it works
TD
-
TheDcoder's post in Button enabled only when a ListViewItem is selected was marked as the answer
@kylomas You saved my GUI, Thanks
Solution:
I enhanced kylomas's code and made this function:
Func ListCheck() Switch GUICtrlRead($hListYourList) ; Your List Case 0 Switch GUICtrlGetState($hYourButton) ; Your button to check Case 80 GUICtrlSetState($hButtonEnabled, 128) ; Add any buttons here if you have multiple buttons Case Else Return EndSwitch Case Else Switch GUICtrlGetState($hYourButton) ; Your button to check Case 144 GUICtrlSetState($hYourButton, 64) ; Add any buttons here if you have multiple buttons Case Else Return EndSwitch EndSwitch EndFunc Use the above function in your GUI's while loop
May it help you, TD
-
TheDcoder's post in make a variable of part of url was marked as the answer
StringRight("nos.nl/teletekst#801", 3) TD
-
TheDcoder's post in Paste Chinese Text in SciTE? was marked as the answer
Go to File (Menu Item in SciTE) --> Encoding --> UTF - 8 with BOM
BOM is required b/c AutoIt Wrapper does not support plain UTF-8
TD
-
TheDcoder's post in _Singleton Generates Multiple Objects! was marked as the answer
Thanks Melba!
This code works:
; NOTE: Removed line no.6 & modified line no.7 in the previous code :) #include "Misc.au3" Func Test($sIdentifier) Switch _Singleton($sIdentifier, 1) Case 0 MsgBox(64, "Testing, Testing", "Its working!!") Case Else MsgBox(64, "Testing, Testing", "Its not working!!") EndSwitch EndFunc Test("Lick the lemon") TD
P.S I still wonder why my first code doesn't work
-
TheDcoder's post in Which is the fastest? was marked as the answer
Sorry guys, such a simple question, I have determined the winner
You can run this code (multiple times) to find it out yourself:
Global $number = Random(0 , 10, 1) Global $pass = False Global $time_if = TimerInit() For $i = 0 To $number If $i = $number Then $pass = True Next $time_if = TimerDiff($time_if) MsgBox(64, "Timer", '"If" took ' & $time_if & ' milli-seconds.') $pass = False Global $time_switch = TimerInit() Switch $number Case 0 $pass = True Case 1 $pass = True Case 2 $pass = True Case 3 $pass = True Case 4 $pass = True Case 5 $pass = True Case 6 $pass = True Case 7 $pass = True Case 8 $pass = True Case 9 $pass = True Case 10 $pass = True EndSwitch $time_switch = TimerDiff($time_switch) MsgBox(64, "Timer", '"Switch" took ' & $time_if & ' milli-seconds.') MsgBox(64, "The winner is...", "The winner is...", 3) If $time_if < $time_switch Then MsgBox(64, "The winner is... If!!!", "The winner is... If!!!") Global $diff = $time_switch - $time_if Else MsgBox(64, "The winner is... Switch!!!", "The winner is... Switch!!!") Global $diff = $time_if - $time_switch EndIf MsgBox(64, "Intel", "The difference was only " & $diff & " milliseconds." & @CRLF & '(BTW, The random number was ' & $number & '.)') (or You can cheat by hitting "Show")
TD
-
TheDcoder's post in Child Window Help was marked as the answer
Original answer from this post by binhnx, you should have a look at it if you need more information (Also to know the cons of using the following solution) . This post is made to make life easier for people who have been suffering from this problem
Here is your answer:
#include-once ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> Global $test_gui = GUICreate("test",300,300,-1,-1,-1,-1) GUISetBkColor(0xFFFFFF,$test_gui) GUISetState() ; This is the faulty statement: Global $test_child_gui = GUICreate("test child", 150, 150, 0, 0, $WS_POPUP, $WS_EX_MDICHILD, $test_gui) Global $test_child_gui = GUICreate("test child", 150, 150, 0, 0, BitOr($WS_CHILD, $WS_VISIBLE, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS), -1, $test_gui) ; You should change the faulty statement to the above correct statement to avoid the "Aero Window Apperence Delay" effect.... GUISetBkColor(0xFF0000, $test_child_gui) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Before:
(click images to animate them) After: TD
-
TheDcoder's post in Can i declare a variable multiple times? was marked as the answer
; Testing variables with Global Scope Global $var_global = InputBox("Testing Global Variables", "Please enter anything: ") Global $var_global = InputBox("Testing Global Variables", "Please enter anything: ") ; Results: ; ; 1st declaration = The ; 2nd declaration = Dcoder ; ; Result = Dcoder MsgBox(64, "Result", "Result: " & $var_global) ; Testing variables with Global Scope Local $var_local = InputBox("Testing Local Variables", "Please enter anything: ") Local $var_local = InputBox("Testing Local Variables", "Please enter anything: ") MsgBox(64, "Result", "Result: " & $var_local) ; Results: ; ; 1st declaration = The ; 2st declaration = Dcoder ; ; Result = Dcoder ; Testing variables with Dim Scope Dim $var_dim = InputBox("Testing Dim Variables", "Please enter anything: ") Dim $var_dim = InputBox("Testing Dim Variables", "Please enter anything: ") MsgBox(64, "Result", "Result: " & $var_local) ; Results: ; ; 1st declaration = The ; 2st declaration = Dcoder ; ; Result = Dcoder ; Conclusion: Declaring a variable with any scope a 2nd time will result in loss of data in the variable Exit TD
-
TheDcoder's post in Adlib doubt was marked as the answer
File transfer was paused..... Sorry for asking, I was curious and not at home
TD
-
TheDcoder's post in Error for no reason!? was marked as the answer
Problem solved... All the hard work has gone down the drain, this piece was causing the problem:
#include "GUI.isf" -
TheDcoder's post in GUISetState Doubt was marked as the answer
This is the original answer:
This post helped me locking the Control:
-
TheDcoder's post in Weird error with script which accepts commandline arguments was marked as the answer
Disable AV before compile