I want to have a computer on which the player can type on, like this:
The Lab is a room.
A desk is in the lab. On the desk are a personal computer and a note.
Description of the note is "Password: wh23".
Typing it on is an action applying to a topic and a touchable thing.
Understand "Type [text] in/into/onto/on [something]" as typing it on.
Instead of typing something on the computer:
say "wrong password".
Instead of typing "wh23" on the computer:
say "welcome back, user!"
test me with "x note / type wh23 into computer"
This throws the Error: "but an action can only apply to things or to kinds of value"
I tried lots of variations of this, none worked.
Is it only possible to have the topic at the end of the line?
What am I doing wrong?
I'm not sure why, but you need to specify the amounts:
Typing it on is an action applying to one topic and one touchable thing.
The next issue will be that topics aren't considered to be "something" so the first instead rule must be changed to:
Instead of typing some topic on the computer:
say "wrong password".
Related
I am trying to figure out how I can simply remove a portion of a filename on a transfer. I need the numbers to remain unchanged with 'check-aft' buttressing up against them as a prefix.
Source: check-aft-eft-12345678-0001
Destination: check-aft12345678-0001
I cannot for the life of me figure out how to either use the Find and Replace feature which BMC mentions, but then provides zero guidance for, or how I would utilize the variables to do so. I have review all of their documentation and watched so many videos, but they do not cover this scenario.
I would appreciate any help getting '-eft-' removed from this filename.
I have tried creating variables for '-eft-' and for 'check-aft' but I am unable to figure out how i can tell it to look for 'check-aft-eft-' and remove '-eft-'
Find & Replace is used for making bulk changes to job definitions, it has no direct relation to AFT jobs (unless you are changing the AFT job defs, that is).
The AFT jobs have many useful features hidden away on the "Advanced" button. If you literally want to change the file name, click Advanced and go to "Destination Actions" on the General tab. Here select "Renamed" where it says "After the completion of a successful file transfer the destination file will be:" and enter check-aft12345678-0001.
If, however, the numbers can be any value - go to the "File Watcher" tab (still in the "Advanced" pop-up) and use "Output / Variable containing detected file name". Set it to something like found_aft_file_1.
You now have a variable that you can do SUBSTR on -
%%PARTONE = %%SUBSTR %%found_aft_file_1 1 10
%%PARTTWO = %%SUBSTR %%found_aft_file_1 15 13
Then %%PARTONE.%%PARTTWO will return the required value.
Tokenize2 is a javacsript lib to select multiple options.
It provides a very neat UI to start writing and then get a list of options to select from. Selected options will show up as "tags" that can be removed with "x" link.
So far all is fine. But Right now you need to know what your looking for and start write at least one character to see matching alternatives.
In my scenario there are very few alternatives and they are not known to the user. I would like to show ALL options when the user clicks the input box. There is a configuration option named searchMinLength but it is already set to 0.
Is there a workaround that can be used? Maybe like triggering load and dropdown manually?
I know there are a lot of similar alternatives but I picked Tokenize2 because:
It looks clean and nice
It works in mobile browsers
I don't know if there is an "official" approach, but after some investigation I have found an acceptable workaround.
After downloading the Tokenizer2 sourceode I found the following line that triggered my attention:
if(this.input.val().length > 0){
this.trigger('tokenize:search', [this.input.val()]);
}
My interpretation is that the internal search command is not triggered unless the user input has at least one character. This line in sourcecode could easily be modified. I have filed a suggestion for this here: https://github.com/zellerda/Tokenize2/issues/26
My current workaround is to add an event listener for the select event and there trigger the internal search command. That works fine for my scenario and does not force a source code rewrite.
$("#my-dropdown").on("tokenize:select", function (e: Event, routedEvent: boolean) {
$("#my-dropdown").trigger('tokenize:search', "");
});
Tokenize2
This link worked for me GitHub
$('.tokenize-sample-demo1').on('tokenize:select', function(container){
$(this).tokenize2().trigger('tokenize:search', [$(this).tokenize2().input.val()]);
});
Got an issue with keymapping commands:
https://www.youtube.com/watch?v=d5nrEO_t7Wo
As you can see in the video, when I call the commands by keyboard shortcut:
On the first attempt - the function isn't called.
On the second attempt - the function is called.
Where as, when I call the commands via the command pallet, the commands are called even on the first attempt. Not shown in the video, I can call the commands from the command pallet more than once without fail.
This leeds me to believe there is something wrong with my keymap.coffee:
'.editor:not(.mini)':
'shift-cmd-h': 'hex:view'
'alt-down':'editor:add-selection-below'
'alt-up':'editor:add-selection-above'
'.editor':
'cmd-k':'jxa:compile'
'shift-cmd-k':'jxa:compileApp'
'cmd-u':'jxa:execute'
However I can see nothing clearly wrong here... So perhaps there's something wrong with my init.js?
https://github.com/sancarn/JXA-Compile/blob/master/src/init.js
Any ideas?
This was solved by DamnedScholar here.
Okay, no. It's because cmd-k is bound to so many things. Go into Settings -> Keybindings and search for it and you'll see a lot of different things attached to it that are all bindings with multiple key presses. So when you press cmd-k, Atom waits to see what your next key press will be. You should consider using something different for jxa:compile.
I have downloaded the Alexa Skills online tutorial found at:
https://github.com/amzn/alexa-skills-kit-js/blob/master/samples/reindeerGames/src/index.js
and followed (I think) all of the instructions in the tutorial found at:
https://developer.amazon.com/public/community/post/TxDJWS16KUPVKO/New-Alexa-Skills-Kit-Template-Build-a-Trivia-Skill-in-under-an-Hour
This is meant to be a tutorial for first time Alexa Skills developers. My question is, I get this error message once I hit the "Save and Test" button:
errorMessage": "Exception: TypeError: Cannot read property 'application' of undefined"
Does anyone know what the above error means or how to get rid of it?
Thanks v much.
This looks like a javascript error telling you that you are trying to use a property named application on an undefined variable.
JavaScript assigns the value "undefined" to any variable that you use but haven't set yet.
There are a several ways that you can debug problems in your Lambdas. Perhaps the easiest is to review the Logs. To do this:
Go to the Lambda console (where you upload your code to Lambda)
Select the Monitoring tab
Select "View logs in CloudWatch" (in the upper right)
Review the latest log, looking for a reported error in one of your files (typically index.js) and specifically the line number. That should help you find the error.
Note that the time stamps will be GMT, so probably won't match your actual time. This can be confusing if you have multiple entries. But the minutes should match, helping you verify that you're looking at the correct log entry.
A more advanced, and quicker way to debug Lambda problems, is the include a "test" request, and run this each time you upload code to Lambda.
To set this up:
Run one of your defined utterances in the ASK test page under the "Service Simulator" section.
Copy the code displayed below that in the "Lambda Request" section.
Now switch to the Lambda console for your Lambda function
Click the down arrow in the Actions button and select "Configure test event"
Paste the request you copied above into the text field
Click Save and Test.
Now each time you upload new code to Lambda, you can select "Test" and the request that you just saved will be run.
And best of all, the console log will be displayed in the lower right corner, saving you from having to switch to the logs and refresh to view them.
Im trying to create a text based adventure game. It prompts the user for a command NAV SHLD PHAS LRS SRS EXIT.
I could easily make the commands related to numbers and do it that way, but that is not as cool. I want my code to be able to recognize that one of these phrases has been entered in console and proceed from there.
printf("NAV PHAS LRS SHLD DOCK EXIT \n");
printf("Command ? \n");
scanf("%c", &command);
This is how I tried to get the code to work and needless to say it does not.
The Variable "command" is a declared as a char "char command;"
Thank you for any help you can give me i've hit quite a roadblock here :(