Author Topic: Importing scripts from posts - dosent always work  (Read 1558 times)

0 Members and 1 Guest are viewing this topic.

aussie mate

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 2
    • View Profile
Importing scripts from posts - dosent always work
« on: March 08, 2014, 08:48:35 PM »
I have found that when importing scripts that have been posted on the forum - while many can be copied & pasted ok - i find often that some scripts don't seem to be able to be imported into my VC. An example is in the XML exchange board - the "Google now" post -it doesn't import for me but the "Coming Home" one does.

any idea what may be causing this?

Go Manly, NSW & the All Blacks

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Importing scripts from posts - dosent always work
« Reply #1 on: March 08, 2014, 09:26:24 PM »
You must copy and paste xml from the complete code block on the forum.  You don't "import" it per se.  If someone attaches an xml file you import that file, but with raw xml on the forum, just use copy and paste and make sure you get everything in the code block.

The xml code block that Sean recently posted about Google now works fine (I just tested it), as long as you copy and paste the entire xml.  If you try to save this xml to a file and then import it, it won't work.  This has been covered many times on the forum.

Have a look at this: http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum
« Last Edit: March 08, 2014, 09:48:05 PM by jitterjames »

aussie mate

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 2
    • View Profile
Re: Importing scripts from posts - dosent always work
« Reply #2 on: March 09, 2014, 12:41:50 AM »
Thanks James for the quick reply.

I did read that wiki before posting to make sure that i understood it.
I did select the complete xml and tried to copy it to VC. as I said this process does work sometimes - so I know how to do it.
I also have successfully "imported" a file by the "drag & drop" - but as this is not a file I didn't use that method here.

That said - I have just tried again using the Copy & Paste method with the code block from Sean - I double checked that I had selected the whole code block and it still would not work.
I checked that I had selected the whole lot by pasting it into Notepad.
The Notepad shows the whole code from the 1st line to the last line is the same as what is in the post.

I also note that if I try to miss a character  or leave a bit out of the the section - VC comes up with notice "you can only drag Groups or xml files here"
when I do select the full code block & right mouse click and select Paste - then nothing happens.

However - I have just discovered that if I use Ctrl-V - this works. it does however puts the relevant commands onto an existing command group tree rather than creating a new group.

 
Go Manly, NSW & the All Blacks

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Importing scripts from posts - dosent always work
« Reply #3 on: March 09, 2014, 08:36:36 AM »
Hi Aussie mate,

I think I may have a sense of what's happening, although I'm having trouble duplicating it.

Sean's xml is for a single command and not a group. Commands can't "float" -- they must be put in a group, whether you create one first and then paste in the command or whether it gets pasted into an existing group.

You can't paste a command into "empty space".

By using the ctrl-v method, you're guaranteeing that the command is being pasted into an existing group because something must be selected. With right-click, it's possible to paste in empty space depending on how big your command tree window is.

I *think* that in this scenario, you will only see the paste option rather than the full command context menu that you would see if pasting properly into a group. So that might serve as a cue of what's happening. But if ctrl-v is working reliably for you, then perhaps that's the way to go.
« Last Edit: March 09, 2014, 12:01:35 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

aussie mate

  • Jr. Member
  • **
  • Posts: 27
  • Karma: 2
    • View Profile
Re: Importing scripts from posts - dosent always work
« Reply #4 on: March 09, 2014, 09:27:26 AM »
Yeah - I think you are right - if I select a group and right mouse click - I can paste ok.
yet if I right mouse click down the bottom of the tree - the paste comes up - but wont paste..
it is only on code without a group.

This is a little tip to remember for the newbies..
Go Manly, NSW & the All Blacks

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Importing scripts from posts - dosent always work
« Reply #5 on: March 09, 2014, 09:33:43 AM »
When you drag and drop a command into empty space (i.e. not on a group) the UI will warn that you "can't drop that there".  I will have to look at what is happening in the code when you try to right-click and paste into empty space to see if I can display the same message.