Element to use for
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By It_is_me_Me
I have provided a portion of my script (seen below) and I wanted to use what the USER will input into my IP address box and input box for TCP port. I set the IP address to use 0.0.0.0 as default and the Port to 502. But I want to let the user change it and when they click the buttons (IP Address and Port), the tooltip will show what the USER entered. How can I use the details that the User will input into my input box and IP address box and let them see what they entered when they click the buttons?
Here are the scripts:
;-------------------------------------------------------------
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>
#include <Date.au3>
#include <TabConstants.au3>
#include <GuiTab.au3>
Global $Form1 = GUICreate("Security Automation", 490, 339, -1, -1)
;MAIN Tab
Global $TAB = GUICtrlCreateTab(0, 0, 489, 337)
Global $tab_main = GUICtrlCreateTabItem("Main")
$label_Title = GUICtrlCreateLabel("ETP-073 Security", 12, 33, 103, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;-----------------TCP User input information-------------------------------------------------------------------------------
$groupBox_TCP = GUICtrlCreateGroup("TCP", 12, 49, 289, 57, BitOR($GUI_SS_DEFAULT_GROUP,$BS_FLAT))
;TCP IP address
Global $IPAddress1 = _GUICtrlIpAddress_Create($Form1, 20, 81, 170, 21)
$Label_ipAddress = GUICtrlCreateLabel("Host IP Address", 20, 65, 80, 17)
$userInputIP = _GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")
;TCP Port
$label_tcpPort = GUICtrlCreateLabel("Port", 196, 65, 23, 17)
Global $input_tcpPort = GUICtrlCreateInput("502", 196, 81, 57, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$userPort = GUICtrlRead($input_tcpPort)
;TCP Address
$label_tcpAddress = GUICtrlCreateLabel("Addr.", 260, 65, 29, 17)
Global $input_tcpDevAddress = GUICtrlCreateInput("1", 260, 81, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
;Buttons
Global $btn_userIP = GUICtrlCreateButton("User IP", 308, 297, 81, 25)
Global $btn_Port = GUICtrlCreateButton("Port", 404, 297, 75, 25)
;Showing the GUI
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $btn_userIP
ToolTip($userInputIP)
Case $btn_Port
ToolTip($userPort)
EndSwitch
WEnd
;--------------end of script ------------------
Note: There will be a "!->Includefile <WMDebug.au3> not found." Pay no attention to it.
-
By Jefrey
Needed a way to store global temporary & permanent information and came up with this.
This is inspired by NodeJS's store and store2 packages, as well as W3 specs' localStorage and sessionStorage, offering multiple ways of usage.
This is not related to any browser's storage, nor will allow you to access or modify browsers storage - although this is possible and not a hard task, this is not what this UDF is intended to do.
This UDF offers functions for temporary storage (that gets cleaned up once the application is shutdown) that is kept on memory using ScriptingDictionary, as well as for permanent storage, that is saved on the harddisk as an encrypted file.
sessionStorage (temporary storage)
It's useful to keep application state and temporary settings accessible by any part of your script (although it could also be done with a global variable, I still prefer this method).
You have multiple ways, at your choice, to:
; add or modify a key sessionStorage("foo", "bar") store("foo", "bar") sessionStorage_set("foo", "bar") sessionStorage_setItem("foo", "bar") ; read a key (returns false if key does not exist) $read = sessionStorage("foo") $read = store("foo") $read = sessionStorage_get("foo") $read = sessionStorage_getItem("foo") ; delete a key sessionStorage_remove("foo") ; delete all keys sessionStorage_clear() sessionStorage_clearAll() localStorage (permanent storage)
It's useful to store user-defined settings.
; initialize ; this is optional, but allows you to control ; how things are going to be saved localStorage_startup([file where you want the settings to be saved], [crypt password]) ; by default, if not supplied, if supplied the "Default" keyword (or if you dont initialize), ; the file will be a random-named file (based on @ScriptFullPath) at user's %APPDATA% ; and the password will also be based on @ScriptFullPath ; you can set only the crypt password if you want: ; localStorage_startup(Default, "mypassword") ; the usage is the same as sessionStorage ; add or modify a key localStorage("foo", "bar") store2("foo", "bar") ; notice the '2' localStorage_set("foo", "bar") localStorage_setItem("foo", "bar") ; read a key (returns false if key does not exist) $read = localStorage("foo") $read = store2("foo") $read = localStorage_get("foo") $read = localStorage_getItem("foo") ; delete a key localStorage_remove("foo") ; delete all keys localStorage_clear() localStorage_clearAll() Download
-
By Neonovaz
Hello
Is there anyway to store word documents in Autoit GUI? For example I have a instruction sheet that I want to bundle up with the exe.
So a user simply clicks the icon and the stored document will launch (Something like how you can add objects like excel sheets in word documents )
(I Know we can launch word files from script directory)
-
By BlazerV60
Hello everyone,
I was trying to store this string into my array: "Hamsters | Cute"
But after I store it, I used _ArrayDIsplay and it showed "Hamster" being on one row and "Cute" being on the row after it.
So it looks like the "|" symbol acts as a row seperator in an array.
My question is: Is there a way for my array to display "Hamsters | Cute" in 1 row ?
Thanks,
Brian
-
By Servant
How to store the object or the handler of a current focused window of an Internet Explorer that's not created by an AutoIt v3 script, into a variable?
-
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now