Access Note using string variable
|
12-29-2017, 02:52 PM
Post: #1
|
|||
|
|||
Access Note using string variable
Notes("my.txt") works fine. (If my.txt exists under Notes)
But if I try say: m1:="my.txt" Notes(m1) I get invalid input. Ive tried various things using EXPR(STRING()) but no joy Any ideas how to reference Notes via a stringvar? |
|||
12-29-2017, 04:20 PM
(This post was last modified: 12-29-2017 05:07 PM by Fortin.)
Post: #2
|
|||
|
|||
RE: Access Note using string variable
I'm not aware of Notes(STR) working in any direct manner, but this can work via index: Notes(POS(Notes,STR))
Edit: Just tried and Notes(STR) does work directly. :-) |
|||
12-29-2017, 04:40 PM
(This post was last modified: 12-29-2017 04:46 PM by StephenG1CMZ.)
Post: #3
|
|||
|
|||
RE: Access Note using string variable
(12-29-2017 02:52 PM)Stevetuc Wrote: Notes("my.txt") works fine. (If my.txt exists under Notes) Seems to work OK here on Android. Code:
Are you seeing the Invalid Input when you assign a string to m1 or when you execute Notes(m1)? Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
12-29-2017, 06:21 PM
Post: #4
|
|||
|
|||
RE: Access Note using string variable
(12-29-2017 04:40 PM)StephenG1CMZ Wrote: Seems to work OK here on Android. Ive checked again and the problem seems to be due to the input statement I am using in my main program Code:
If the above is run and the default filename is accepted with OK, then Notes works fine. However if you click on the textbox, so that the string appears on the edit line, then even if you just ok without an edit, it throws "Invalid input" |
|||
12-29-2017, 09:10 PM
Post: #5
|
|||
|
|||
RE: Access Note using string variable
(12-29-2017 06:21 PM)Stevetuc Wrote:(12-29-2017 04:40 PM)StephenG1CMZ Wrote: Seems to work OK here on Android. Try adding the input type in the INPUT command. Without it, you have to enter the string in quotes. Code: INPUT({{m1,[2]}},"Enter Filename","Filename","",0,"my.txt"); Tom L Cui bono? |
|||
01-01-2018, 09:02 AM
Post: #6
|
|||
|
|||
RE: Access Note using string variable
(12-29-2017 09:10 PM)toml_12953 Wrote:(12-29-2017 06:21 PM)Stevetuc Wrote: Ive checked again and the problem seems to be due to the input statement I am using in my main program Thanks, that works well. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)