Sign in to follow this  
Followers 0
sandin

Few questions

7 posts in this topic

1. I've found a lot of scripts for changing tab's background, but haven't found any that shows how to change tab's txt color. Something like _GUICtrlTab_HighlightItem would be useful too, but that requires tabs to be buttons, and not really tabs, so is it possible to change tab's txt and how? (or highlight a tab, without using $TCS_BUTTONS option?)

2. I have edit item in my script which is being used for inputting txt, or commands, I would like to set it to record all previous inputs, so by pressing UP on my keyboard I get previous inputs, is there a simple command which I'm not aware of, or I must write a code to store inputs in memory, and recall them on "UP" hotkey?

3. I have GUICtrlCreateObj in my script, which is related to _IECreateEmbedded, I would like to get focus on input control if I click left mouse button on this object, but GUICtrlSetOnEvent won't work, I even tried to made this in while1 option:

if ControlGetFocus($GUI) = "Internet Explorer_Server1" then GUICtrlSetState($InputEdit, $GUI_FOCUS)

but it still won't work, is there a way to make left clicking onto IE object focus inputEdit control?

Thank you

Share this post


Link to post
Share on other sites



For the text colour on tabs perhaps this might be useful by Valik.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

does any1 have a suggestion on how to resolve my No.2 and No.3 issue? ;/

2.

#include <guiconstants.au3>
HotKeySet("{up}", "showHist")
HotKeySet("{DOWN}", "showHist")
$Title = "input with history"
$Gui1 = GUICreate($Title)
$ip1 = GUICtrlCreateInput("", 20, 20, 200, 22)
Global $history = '', $HItems
$histSel = 0
GUISetState()

While 1
    
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
    If $msg = $ip1 Then
        $ipText = GUICtrlRead($ip1)
        $histSel = 0
        If $ipText <> '' Then
            If $history = '' Then
                $history &= $ipText
            Else
                $history = $ipText & '|' & $history
            EndIf
        EndIf
    EndIf
WEnd



Func showHist()
    If $history = '' Then Return
    If ControlGetFocus($Title, "") <> "Edit1" Then Return
    If @HotKeyPressed = "{UP}" Then
        $histSel += 1
    Else
        If $histSel > 1 Then $histSel -= 1
    EndIf
    
    $HItems = StringSplit($history, '|')
    If $histSel > $HItems[0] Then $histSel = $HItems[0]

    GUICtrlSetData($ip1, $HItems[$histSel])
    
EndFunc  ;==>showHist

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

2.

#include <guiconstants.au3>
HotKeySet("{up}", "showHist")
HotKeySet("{DOWN}", "showHist")
$Title = "input with history"
$Gui1 = GUICreate($Title)
$ip1 = GUICtrlCreateInput("", 20, 20, 200, 22)
Global $history = '', $HItems
$histSel = 0
GUISetState()

While 1
    
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
    If $msg = $ip1 Then
        $ipText = GUICtrlRead($ip1)
        $histSel = 0
        If $ipText <> '' Then
            If $history = '' Then
                $history &= $ipText
            Else
                $history = $ipText & '|' & $history
            EndIf
        EndIf
    EndIf
WEnd



Func showHist()
    If $history = '' Then Return
    If ControlGetFocus($Title, "") <> "Edit1" Then Return
    If @HotKeyPressed = "{UP}" Then
        $histSel += 1
    Else
        If $histSel > 1 Then $histSel -= 1
    EndIf
    
    $HItems = StringSplit($history, '|')
    If $histSel > $HItems[0] Then $histSel = $HItems[0]

    GUICtrlSetData($ip1, $HItems[$histSel])
    
EndFunc ;==>showHist
that's pretty sweet, nice job.

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0