How to copy current Url to Value


I tried this but it doesn’t work? what am I doing wrong?

Hi

Your code is wrong, search in the forum the correct code

{
  "Name": "1",
  "CreationDate": "2019-3-23",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://status.ocr.space/",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "${!URL}",
      "Value": "!clipboard"
    }
  ]
}

i did but that was the code that I found and it doesnt work

The code i posted working like a charm.

Please study kantu you can’t claim not to study and know how to use kantu otherwise you pays a professional who makes you the codes.

Hi,
I studied kanto and built several things until know. I knew that if I will fix that the rest of the code will work fine. I just had a little problem with bigger code:

{
“Name”: “lawguide beta 4”,
“CreationDate”: “2019-10-26”,
“Commands”: [
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!ErrorIgnore”
},
{
“Command”: “store”,
“Target”: “@{!URL}”,
“Value”: “!clipboard”
},
{
“Command”: “open”,
“Target”: “!clipboard”,
“Value”: “”
},
{
“Command”: “gotoIf_v2”,
“Target”: “{l1counter} > 0", "Value": "one" }, { "Command": "store", "Target": "0", "Value": "l1counter" }, { "Command": "store", "Target": "1", "Value": "l2counter" }, { "Command": "label", "Target": "one", "Value": "" }, { "Command": "storeEval", "Target": "{l1counter}+1”,
“Value”: “l1counter”
},
{
“Command”: “click”,
“Target”: “id=SelectCatID”,
“Value”: “”
},
{
“Command”: “select”,
“Target”: “id=SelectCatID”,
“Value”: “label=פלילי”
},
{
“Command”: “clickAndWait”,
“Target”: “xpath=/html/body/div[5]/div[2]/div/div[1]/div[1]/form/input”,
“Value”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “/html/body/div[5]/div[2]/div/div[2]/div[2]/form/div[{l1counter}]/div[1]/div[2]/div/a[1]/span", "Value": "" }, { "Command": "if_v2", "Target": "!{!LastCommandOK}”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “link=הבא >”,
“Value”: “”
},
{
“Command”: “storeEval”,
“Target”: "{l2counter}+1", "Value": "l2counter" }, { "Command": "store", "Target": "{!URL} ",
“Value”: “!clipboard”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “storeText”,
“Target”: “/html/body/div[5]/div[2]/div/div[2]/div[1]/div[1]/div[1]/div[2]”,
“Value”: “!csvLine”
},
{
“Command”: “storeText”,
“Target”: “/html/body/div[5]/div[2]/div/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]”,
“Value”: “!csvLine”
},
{
“Command”: “csvSave”,
“Target”: “taltest.csv”,
“Value”: “”
}
]
}

by the way,
now I have problem with opening the url that was saved in the clipboard. If you could have helped me that could be great :slight_smile:

Where do you read this command ?

Can you post the url page with this command please ?

    {
    “Command”: “store”,
    “Target”: “@{!URL}”,
    “Value”: “!clipboard”
    },

@{!URL} ???

I use this and working

    {
      "Command": "store",
      "Target": "${!URL}",
      "Value": "!clipboard"
    }

url :
https://www.lawguide.co.il/
{
“Command”: “store”,
“Target”: “@{!URL}”,
“Value”: “!clipboard”
}

thanks to you the store of the url to the clipboard is working :slight_smile: thank you.

now I am trying to open the url that has been saved to the clipboard

{
“Command”: “open”,
“Target”: “!clipboard”,
“Value”: “”
},

but it doesn’t work. it only writes:
https://www.lawguide.co.il/!clipboard

Change your code in this mode and now working

To store/update the value you must use !clipboard

to use the value in your macro you must use ${!clipboard}

{
“Command”: “open”,
“Target”: “${!clipboard}”,
“Value”: “”
},

I tried this but its still doing this:
https://www.lawguide.co.il/@{!URL}

writes the the word url.

I want this to save the url first and then open the saved url

I tried this but it doesnt work:
{
“Command”: “store”,
“Target”: “@{!URL}”,
“Value”: “!clipboard”
},
{
“Command”: “open”,
“Target”: “${!clipboard}”,
“Value”: “”
}

Update your code in this mode

{
“Command”: “store”,
“Target”: “${!URL}”,
“Value”: “!clipboard”
},
{
“Command”: “open”,
“Target”: “${!clipboard}”,
“Value”: “”
}