Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Just making sure...there is no way to open handouts within roll20 (not via external links) via the API

The title basically says it all...but there is no of opening "handouts" within roll20 via the api or macro? I know you can use the external link to open them but then you lose all the functionality like creating links to run commands or macros it seems. I have been looking but not finding much
1630815843
Kraynic
Pro
Sheet Author
If you create a link in a journal entry (the normal link with single square brackets around the title of what you want to link to), you can use that link (right click and copy the link) in chat menu buttons to open the handout. [Text of the link](link you copied in-game) I've no idea how you go about doing that using a script though.
1630826143
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You cannot open them automatically via the API. The API can create a link in the chat or in a handout as demonstrated above, but it requires action on the part of the GUI to do the actual opening. I'm not sure what you mean by this line, though. Can you give an example? I know you can use the external link to open them but then you lose all the functionality like creating links to run commands or macros it seems. 
1630838572

Edited 1630839228
Well I can opening the handout but it ends up being external link...so any sort of chat command in the handout do not end up working but they give me a 404. I would like to open within roll20? In a div I guess not a new window?  Maybe I am not stating it correctly...I want it to open the handout so the chat commands will work? I am doing something wrong... [Pathfinder 2 Conditions](link you copied in-game)
1630852736
Kraynic
Pro
Sheet Author
Let's say I have a handout called "Fire Dragon".  I also have a handout called Bestiary that has links to all the individual handouts including the Fire Dragon entry.  I can right click on the Fire Dragon link in the Bestiary handout to get the in-game journal link, and use that for the link in the button.  That calls/opens the in-game journal entry.  This is a screenshot of the quick test I ran, and I didn't open the Fire Dragon handout from the Bestiary link, but by clicking "Show Fire Dragon" in chat.  I pressed the up arrow to show you how that button was constructed and what the link should look like. Note that I am using a single left click to bring this up, so no right click or opening in a new tab. I don't play with the setting checked to pop things out in their own window, but I tested that way and it opened it up in its own window just fine as well.  Right click and open in new tab does fail though, probably since then the new tab it is trying to open into isn't created or directly connected with the game instance anymore, since it is being generated by a browser function instead of called for by the vtt.
1630859770

Edited 1630860313
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That URL looks wrong, from the unobscured portion. A handout link should look something like: Handout <a href="http://journal.roll20.net/handout/-LsozHTxW8V4SA3RlZaQ" rel="nofollow">http://journal.roll20.net/handout/-LsozHTxW8V4SA3RlZaQ</a> Character <a href="http://journal.roll20.net/character/-M2RpLoMYEQLFT3v8LZp" rel="nofollow">http://journal.roll20.net/character/-M2RpLoMYEQLFT3v8LZp</a> Compendium Page <a href="https://app.roll20.net/compendium/dnd5e/Curving%20Shot#h-Curving%20Shot" rel="nofollow">https://app.roll20.net/compendium/dnd5e/Curving%20Shot#h-Curving%20Shot</a> Edit: It looks like you are copying from the External Journal. That's an entirely different interface that does not work in-game, depending on who is clicking it. Use the method Kraynic described above, and you should get a link that will work as you need it to. External Journal <a href="https://app.roll20.net/campaigns/journal/4665985/handout/-LsolEsN4UZpfdQ-fUel" rel="nofollow">https://app.roll20.net/campaigns/journal/4665985/handout/-LsolEsN4UZpfdQ-fUel</a>