-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
MsgBox/MessageBox - Move and change button text
TheDcoder replied to SmOke_N's topic in AutoIt Example Scripts
Excuse me, but can I know why is the below code not working? _MsgBoxEx(48, "Test", "Taste", -1, -1, "Pest", "Paste") -
Hello, why is the below code not splitting buttons? (_MsgBox) _MsgBox(48, "Test", "Test", -1, 0, "Pest|Paste") TD
-
@binhnx Thanks, Solved
-
#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() ; Before: 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_CLIPCHILDREN, $WS_CLIPSIBLINGS), -1, $test_gui) ; After GUISetBkColor(0xFF0000, $test_child_gui) GUISetState(@SW_SHOW, $test_child_gui) Global $test_child_gui2 = GUICreate("test child 2", 150, 150, 0, 0, BitOr($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS), -1, $test_gui) GUISetBkColor(0x00CCFF, $test_child_gui2) GUICtrlCreateButton("My Text",20,230,100,30,-1,-1) GUICtrlCreateButton("My Text",180,230,100,30,-1,-1) Global $red = GUICtrlCreateButton("Red", 20, 230, 100, 30, -1, -1) Global $blue = GUICtrlCreateButton("Blue", 180, 230, 100, 30, -1, -1) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $red SwitchColour(1) Case $blue SwitchColour(2) EndSwitch WEnd Func SwitchColour($id) GUISetState(@SW_HIDE, $test_child_gui) GUISetState(@SW_HIDE, $test_child_gui2) If $id = 1 Then GUISetState(@SW_SHOW, $test_child_gui) Else GUISetState(@SW_SHOW, $test_child_gui2) EndIf EndFunc I made this code for testing but the buttons are not being displayed, any help?
-
@binhnx A big thanks to you!!
-
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
-
@JakeKenmode Not working....
-
@binhnx You can refer to this thread... TD
-
@JakeKenmode I have already tried that but I need a more logical (i.e. sleep until main GUI appears completely) solution Thanks anyway Jake TD
-
@JLogan3o13 Updated the question
-
Hello, Please look at the image below: (Click for animation) Notice that the "Red" section appearing instantly before the Main GUI... Code: #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(@SW_SHOW, $test_gui) Global $test_child_gui = GUICreate("test child", 150, 150, 0, 0, $WS_POPUP, $WS_EX_MDICHILD, $test_gui) GUISetBkColor(0xFF0000, $test_child_gui) GUISetState(@SW_SHOW, $test_child_gui) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd How can I prevent it? Thanks in Advance
-
Sorry mpower, When I saw the word "cygwin" my mind instantly ignored your post... Although your idea works but installing cygwin is a burden in itself. I need a more simple & universal way of doing it, hope you don't mind my ignorance or rude kind of behavior Your work is greatly appreciated TD
-
@SadBunny You can refer to >this post TD
-
If transferred internally using 2 hard-disk in the same system with NTFS file system being used in both hard-disks, It will survive.... (Or a USB formatted in NTFS would carry the file safely )
-
Thanks water, I want my log files to survive in ext file-systems too
-
Yes, I can, but still I would like to know if there is a way.... Would you mind expanding "ADS"? TD
-
Hints Appreciated TD
-
I am simply adding some extra details to the log files like username, check-sum and then encrypting it
-
@water I prefer to keep my purpose for editing log with autoit confidential, please understand
-
Log files with 5 years of age
-
@water I would be sad if its true
-
Me too
-
Can i declare a variable multiple times?
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
; 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 -
@water Thanks you saved me
-
>_FileWriteToLine Stores the contents of the file in the memory..... TD