Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion
Register FAQ Community Today's Posts Search

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kathorus
Member
 
Join Date: Jan 2013
Posts: 61

Old October 8th, 2016, 06:15 AM
One of the methods of data entry that is suggested for Realm Works is to put in the "Skeleton" of the data so that linking is enabled from the get-go. This could be a lot of clicking for a deep topic, such as spells from the 5e SRD, cities from a world, monsters, weapons, etc.... I still don't think there's a method for add multiple topics at once in the program, so I hacked this together, which basically takes a list of things from one place and makes them a list of topics in Realm Works.

First, the main workhorse for this is AutoHotKeys, which is a robust scripting program that I'm using to handle Windows. (if you're not familiar with it, I suggest reading through the extensive help file)
Second, you need a text editor that has macro ability, I use Notepad++. (again, if you're unfamiliar with the macro functionality, it pays to look it over)
And, of course, Realm Works.

Part 1 - Data prep and macro creation
We need a list of spells, I found an excel sheet with the spell names and pasted those into Notepad++, the important thing is that each topic you wish to create should be on one line in the file.

Next, I created a macro in Notepad++ that does;
'bring me to the top - Ctrl+Home
'select my first line - Shift+End
'cut me to the clipboard - Shift+Delete
'remove my empty line - Delete

I save this marco and give it a keystroke combination.

Part 2 - AutoHotKeys
We need to be able to go to Notepad++, run our macro on our spell list and then go into Realm Works, create a new Topic, paste the spell from the clipboard

First, create a script as explained in AutoHotKeys documentation
Next, Paste this in (the number next to Loop is the number of items in your list)
Code:
Loop, 10 {
		WinActivate, ahk_exe notepad++.exe ; Activate Notepad++ instance
		WinWaitActive, ahk_exe notepad++.exe ; Wait until Notepad++ is active
		Send !^+C ; Send Keystroke for Macro
		Sleep, 1000 ; Sleep for a second			
		WinActivate, ahk_exe RealmWorks.exe ; Activate RealmWorks
		WinWaitActive, ahk_exe RealmWorks.exe ; Wait until RealmWorks is active
		Send ^q^v{Enter} ; Keystrokes to Create Topic, Paste Clipboard, Save Topic 
		Sleep, 1000 ; Sleep for a second
	}
Part 3 - Setup
The script assumes both Notepad++ and Realm Works are open.
In Notepad++, your list should be on the tab with focus.
In Realm Works, you should manually go in and create a new topic under the category you're adding to so that future visits for the script are pointing at the correct category.
Set the number in the Loop to the number of items in your list (I would test a few, prior to running a large list).
Right-Click the script and "Run Script".
Wait a few minutes.

Hope this can be of some use to folks. I can try to answer questions about it, but stuff like this I typically throw together quickly by trial and error.
Kathorus is offline   #1 Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:32 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.