Jump to content

Scroll to the start of an inputbox-field?


Recommended Posts

Hi, i wrote a little script that shows me some relevated information about my system (like ram usage, which cpu ive got, and so on)

These information will be displayed in input-boxes. The info's are longer than the inputbox is in width.

My problem: If i start the script, the info will be set in the input-boxes. But now, i see not the start of the info - i see the end (see in attachement).

How can i prevent this, so that it shows the first part of the infos and not the end?

Attention! English noob ^^

Link to comment
Share on other sites

Hi, i wrote a little script that shows me some relevated information about my system (like ram usage, which cpu ive got, and so on)

These information will be displayed in input-boxes. The info's are longer than the inputbox is in width.

My problem: If i start the script, the info will be set in the input-boxes. But now, i see not the start of the info - i see the end (see in attachement).

How can i prevent this, so that it shows the first part of the infos and not the end?

Hi,

Try to extend the editbox size or try to use a smaller font!

But you'll always have difficulties in diferent screen resolution

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

There's always a way...

; Test Input Box Home
#include <guiconstants.au3>
Opt("GuiOnEventMode", 1)

; Create GUI
$hGUI = GUICreate("Input Box Home", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$HomeButton = GUICtrlCreateButton("<<", 10, 10, 20, 20)
GUICtrlSetOnEvent(-1, "_ButtonHit")
$Input_1 = GUICtrlCreateInput("Very long text for input box: 1234567890", 40, 10, 120, 20)
$EndButton = GUICtrlCreateButton(">>", 170, 10, 20, 20)
GUICtrlSetOnEvent(-1, "_ButtonHit")
GUISetState()

While 1
    Sleep(20)
WEnd

Func _ButtonHit()
    If @GUI_CtrlId = $HomeButton Then
        ControlSend($hGUI, "", $Input_1, "{HOME}")
    Else
        ControlSend($hGUI, "", $Input_1, "{END}")
    EndIf
EndFunc

Func _Quit()
    Exit
EndFunc

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I dont want to change the size of the box, cause its part of an bigger program - and that would look not very nice :/

Is there no way... ?

Hi again.

Cant you share that part of the code?

And if you trim the result for a number of chars?

i know its not pretty...but... :)

Some helps...maybe :

GUICtrlSetLimit

$SS_LEFT

cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

; Test Input Box Home
#include <guiconstants.au3>
#include <GuiEdit.au3>
Opt("GuiOnEventMode", 1)

; Create GUI
$hGUI = GUICreate("Input Box Home", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$Input_1 = GUICtrlCreateInput("Very long text for input box: 1234567890", 40, 10, 120, 20)
_GUICtrlEditSetSel($Input_1, 0, 0)
GUISetState()

While 1
    Sleep(20)
WEnd

Func _Quit()
    Exit
EndFunc

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

; Test Input Box Home
#include <guiconstants.au3>
#include <GuiEdit.au3>
Opt("GuiOnEventMode", 1)

; Create GUI
$hGUI = GUICreate("Input Box Home", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$Input_1 = GUICtrlCreateInput("Very long text for input box: 1234567890", 40, 10, 120, 20)
_GUICtrlEditSetSel($Input_1, 0, 0)
GUISetState()

While 1
    Sleep(20)
WEnd

Func _Quit()
    Exit
EndFunc

UPS...

Didnt saw the INPUTBOX :S

looolloool

Feeling so stupid :)

cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

; Test Input Box Home
#include <guiconstants.au3>
#include <GuiEdit.au3>
Opt("GuiOnEventMode", 1)

; Create GUI
$hGUI = GUICreate("Input Box Home", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$Input_1 = GUICtrlCreateInput("Very long text for input box: 1234567890", 40, 10, 120, 20)
_GUICtrlEditSetSel($Input_1, 0, 0)
GUISetState()

While 1
    Sleep(20)
WEnd

Func _Quit()
    Exit
EndFuncoÝ÷ Ûú®¢×b¢}ý¶ØbKaj×hzÌ!jØ^Á©íyا¶¨®("©i¢Ëjº^²ajØ­²0²Ø^~*춫¶íè§~Ùè¶Ø^zwªê-y8b²ÇÇ%¢Ç«¶jëh×6ControlSend($hGUI, "", $Input_1, "{HOME}")

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...