Writing to text file in app inventor - app-inventor

After continuous search on google, I still can't seem to figure out this problem with app inventor 2.
My question is how can I write to text file as initial value without user input. For example I want to store '6' as the initial value in a text file, there are ways to do it by clicking on button but is there a way to store the initial value without getting the user to enter a value? Also would this value be available each time the app is run? or would I need to set the initial value each time?
Many Thanks in advace

is there a way to store the initial value without getting the user to
enter a value?
Normally you would use a variable to store an initial value. You do not have to store that in a file! But if you like to use a file, you can use the Screen.Initialize event
see also the documentation of the File component
Also would this value be available each time the app is run?
yes, but only if the user did not delete the file manually...
or would I need to set the initial value each time?
Please first do the tutorials to lean the basics of App Inventor!

Related

How to get entry text in glade3 in Ruby?

Its first my first time in stackoverflow to get help.
Im making a Ruby GUI with glade3, but i dont really now how to get texts from an entry box?
It should read the text from entry box and write it in an excel sheet.
I hope you can help me :)
See example here: https://xrob.wordpress.com/2007/04/20/creating-a-gui-application-using-glade-and-ruby/
We want to change something in the application so we will need to assign a variable to the widget that we want to alter. We want to alter “label1” and so we insert this code in the button1_clicked function.
#myEntryBox = #glade.get_widget(“myEntryBox”)
# You can now access properties like '#myEntryBox.text'
# Refer to documentation for exact name of the attribute

Change Xcode 5 file template value for ___FULLUSERNAME___

Is it possible to change the value Xcode 5 substitutes for ___FULLUSERNAME___ when expanding file templates? Looks like this was possible in the past via defaults but it now pulls from the system's full username.
My problem is that I have two user accounts, one work and one personal. I like this separation, however, OSX prevents setting the same full username value on both accounts. I was surprised by this restriction since I assumed it was just a UI thing since the underlying account names are obviously different. Alternatively, I would accept an answer that works around this limitation.
EDIT
I don't want to copy all the standard templates into ~/Library/Developer/Xcode/Templates/File\ Templates/ and do a find a replace with my name since that creates duplicates of every template.
I achieve this by renaming my user name of OS X, check this document by Apple.

RoboHelp CSH always goes to the first help page

I have a WebHelp content directory created using RoboHelp 9. From a web application, I'm trying to display a specific help page using their CSH JavaScript API:
RH_ShowHelp(0, "WebHelp/index.htm>MainWindow", HH_HELP_CONTEXT, <some map id>);
The problem is, the resultant popup always displays the first help topic, regardless of the map id I pass. Does the map file that was created for the RoboHelp project need to be included somewhere in the resultant WebHelp directory? I would think that RoboHelp would handle including whatever it needed in the generated content.
I think what's more likely is that I messed up somewhere in generating the map file/ids. To generate the map ids, I did the following:
Created a new map file
Double clicked it to open the map file window
Selected everything from the right list block (all the topics and help sections)
Clicked 'Auto Generate'
Are there further steps I need to follow before CSH will work?
Perhaps you forgot to include your mapfile in the generated output.
This is done in Web Help, under Content Categories.
Then, you can specify the topic number in the last argument to RH_ShowHelp.
Are you using the published output (not the generated output) in your content directory?
If that doesn't help, you can use simple links like this, which open the specified topic in help in the Help framework:
http://example.com/WebHelp/index.htm#someSubfolderThatIsAChildOfTheRootHelpFolder/theTopicYouWant.htm

Is there any way to clear out the "Testers" field in Microsoft Test Manager (or in TFS)

Seems like once you set the Testers field on a Test Case in MTM, it will not allow you to clear it. You are only allowed to change it to a different value. Has anyone found a way to clear this field?
It is important to not get the "Assigned" Tester field confused with the Assigned To field. They are distinct fields on a Test Case work item. One reason why someone might want the Tester field to be blank is if a team all pitches in to help with testing during an iteration and leaving the assigned tester blank allows the team to know that no one has "picked up" this test to execute. The team member could then assign the test to his or herself and execute it.
The template pulls the Assigned Tester Values from a list using the 'AllowedValues' tag. Instead, simply change this to 'SuggestedValues'. That will allow for empty values - easy as that.
If you'd rather not allow free entry, you can also add a default value such as 'None' and use that rather than blank.
Unless you've customized your work item type, this field should never be blank after being saved. It defaults to the person who created the bug in all Microsoft supported process templates, and a value is required by default.
That being said, why would you want to change it to blank?
If you really, really want to be able to blank it out (which I don't think is a good idea at all), you'll need to customize your template. See the below guidance:
http://msdn.microsoft.com/en-us/library/ms243849(v=vs.110).aspx

capturing what keys were used to launch vbscript

I have an application that has 'macro' capabilities. When I map some keys on the keyboard to perform the 'macro', I can also have it launch vbscript instead.
What i'd like to try and do is within my vbscript figure out what keys were used in order to launch the script. Is it posible to do this? Could there be a way in vbscript to figure out what keys were last touched on the keyboard and then I could apply my logic.
The purpose of doing this is to keep the code in a single .vb file instead of several seperate .vb script files(one for each keyboard mapping, possible 3-4). Obviously we are looking to just maintain 1 file instead of multiple files with essentially the same code in each one.
I am leaning towards the idea that this is not possible, but i figured this would be a worthy question for the masses of StackOverflow. Thanks for the help everyone!
What you are asking for is not possible.
Can you change your VBScript to accept parameters and then call it with a different parameter based on which hotkey was selected?
I agree with aphoria, the only way to make something like this possible is if your keyboard mapping software allows you to assign a script/command with parameters/arguments. For example if you used
c:\Temp\something.vbs
then you would change this to
%WINDIR%\system32\wscript.exe c:\temp\something.vbs "Ctrl-Alt-R"
Then in your vbscript code you could collect the argument using the wscript.Arguments object collection to do actions based on what argument/parameter was passed. See the following two links for more info:
http://msdn.microsoft.com/en-us/library/z2b05k8s(VS.85).aspx
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0915.mspx
The one possible approach you may use is to install keylogger and read its log in your VBScript.
For example save script start time in the very beginning of the script
StartTime = Timer()
and then read one log record of your keylogger before this time.

Resources