Yay!
I figured it out.
Set the top variable (min_to_delay) to the amount of minutes you want to tick by before the it tries to hide the dock again.
Copy past this into "Script Editor", save it as an application, give it a name, a location and fire it up.
By default it will hide the dock every 10 minutes.
The drawbacks are:
-The only way to quit this script is to force quit it (command option esc)
-It adds another icon to the dock
Since you want to hide the dock the icon might not bother you.
If it does you can disable it using
this application.
If you do choose to hide the dock icon the only way to quit this script will be to open "Activity Monitor", select the it's process name and force quit it.
set min_to_delay to "10" --set this to how many minutes you want to go by before hiding the dock
set sec_to_delay to min_to_delay * 60
repeat
tell application "Finder"
activate
end tell
tell application "System Events"
if UI elements enabled then
try
click menu item "Turn Hiding On" of menu "Dock" of menu item "Dock" of menu "Apple" of menu bar 1 of process "Finder"
end try
delay sec_to_delay
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\" to use this script"
end tell
end if
end tell
end repeat