kw_rock Posted October 28, 2009 Posted October 28, 2009 Ok. I am writing a program for MANY other people to use, but don't want to include my source code. The program asks users for a directory location (i.e. C:\Users\Bob\Desktop\Pictures) and then asks them for another piece of data (Both of which are being saved to a variable) How can I hardcode those variables, after the person enters them once, into the program so they no longer need to put in that data? I was going to read/write from a file, but that would require me to create a file ON EVERYONE'S PC and read from it everytime. Thanks
somdcomputerguy Posted October 28, 2009 Posted October 28, 2009 You could use a function such as FileSelectFolder to get the info assigned to a variable, and as long as the program is running, and that variable isn't changed, it will be 'hardcoded'. Into memory anyway. To permanently keep the value of that variable, I believe writing/reading to/from a file is the only recourse. Although I guess it's possible to add the code to a script needed to re-write and then re-compile itself.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
spudw2k Posted October 28, 2009 Posted October 28, 2009 (edited) If you mean local to the machine, how about the registry? Click me RegWrite() Edited October 28, 2009 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
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