This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
mrgreaper's profile picture

multiple questions, mainly turtle related

Started by mrgreaper, 03 March 2012 - 08:41 PM
mrgreaper #1
Posted 03 March 2012 - 09:41 PM
Hi i have computer craft 1.3 on our server and i have a few questions first though we have rednet installed and magicturtle api installed on the server for all players i figure that may help in answering my questions

1) whats the best program to write lua in outside of minecraft (say your at work and when you log in to the server you are bombarded with a million and one questions from players :unsure:/>/> ) ?

2) how do you tell a turtle in a program to go to a specific coord? magic turtle seems to say its magicTurtle.goToPos(x,y,z,mode) how ever, when i try that in lua ie magicTurtle.goToPos(19432,4200,78,false) i get an arthmetic error and if i tell it to go to a -number i get an unexpected symbol error ( the magic turtle api is added in the main apis folder, im guessing if it wasnt installed right it would just error with unknow command or somesuch?) (this is the crucial question lol)

3) how do you get a turtle to place inventory into a chest in front of it? is it just turtle.placeFront() ?

4) can turtles interact with disc drives?

ok heres what i know..
i can do very simple programs,
i know how to disable ctrl+t
i know how to have a program listen to a set terminal for a set command while it does other stuff

heres what i am planning

i want to write a program that will have a turtle,
go up to 100
then go to a set waypoint
descend to 78
go to a waypoint just outside a piston door ,
it will then send the wireless signal to the terminal controlling the door(the wirelss signal bit i know) to have it open it,
fly through it once opened (can it check the block in front of it is air?) and
wait till the door is closed (can it check to see if the block directly behind it is ironblock?)
fly to a coord under a passage way
fly up through the passage
fly to a cord infront of a chest (same chest every time)
turn to face chest (can you make it face north forexample with out relaying on turn left turn left etc)
place its inventory into the chest
fly to a cord above the passage it went up
descend
fly next to a disc drive
replace its startup file with the one on the disc (for upgrades)

now most of those if i know how to send it to exact cords are easy enough, in fact if anyone cna help me with the questions im sure i can sus the rest out (im not looking for some one to program this for me i want to learn but after 2 hours looking i cant find the solutions)
Advert #2
Posted 03 March 2012 - 09:45 PM
1) There are many different programs; Notepad++ is very easy to set up, so I'd recommend you try that.

2) You should ask this in the API's thread, this seems like a bug in the API's code.

3) Turtles can't interact with chests; you'll have to use a pipe and redstone engine/transposer/filter to suck the items out; or you can drop them into a transposer/filter/obsidian pipe (transposer/filter from rp2, others from buildcraft)

4) Yes, as long as they are next to them.
Liraal #3
Posted 03 March 2012 - 10:49 PM
1) I use Notepad++ as well.

2) That's no bug, RTFM! It says clearly that you should first call BOTH setNorth() and setPos(x,y,z) in order to start working with the API…

3) Use Redpower/Buildcraft for that.

4) That's also in the API, autoUpdate() function automatically executes a file in the correct dir when the turtle passes next to it.
mrgreaper #4
Posted 03 March 2012 - 10:53 PM
1) There are many different programs; Notepad++ is very easy to set up, so I'd recommend you try that.

2) You should ask this in the API's thread, this seems like a bug in the API's code.

3) Turtles can't interact with chests; you'll have to use a pipe and redstone engine/transposer/filter to suck the items out; or you can drop them into a transposer/filter/obsidian pipe (transposer/filter from rp2, others from buildcraft)

4) Yes, as long as they are next to them.
thanks for the answers,
1) ah cool i already use that for the evil yml file format
2) will do
3) actualy having it snuggle up against a redpower filter and send 9 redstone signals on off to the filtier sounds very cool i didnt realise they were actual containers in that sense :unsure:/>/> oooo ideas B)/>/>
4) very cool
some additional questions,

5) can it check for air in front of it and ironblock behind it?
6) can you make it face north etc?
7) if i add a new turtle api to the roms folder (well ok the lua api folder) is it immediatly active on all terminals/turtles or do i need to restart the server ? (dont like messing the players about to much B)/>/> )

thanks in advance all help is greatly appreciated
Advert #5
Posted 03 March 2012 - 10:56 PM
5) You can use turtle.detect(), this returns true if any block is infront of it; type 'help turtle' for a list of turtle functions.

6) Yes; but you'll have to keep track of when it turns, I think the API you're using has this.
7) You'll need to either restart the server, or restart the turtles individually.
7b) I wouldn't recommend editing the rom folder, though.
mrgreaper #6
Posted 03 March 2012 - 11:00 PM
sorry didnt see this reply till after i posted im at work so posting between customers and reading as much as i can lol
1) I use Notepad++ as well.

2) That's no bug, RTFM! It says clearly that you should first call BOTH setNorth() and setPos(x,y,z) in order to start working with the API…

3) Use Redpower/Buildcraft for that.

4) That's also in the API, autoUpdate() function automatically executes a file in the correct dir when the turtle passes next to it.

1) yep will do

2) rtfm? the program to make it return to its base will be run from another program the idea is i can send a recall signal and the turtles will 1 by one execute the program and return so i wont know what cords they will be at when i execute it will that matter? hmmm must refind the magic turtle thread lol (ignore this if thats answered in that)

3) yep have some very cool ideas for that :unsure:/>/>

4) thats very cool! will have to look up the thread again lol i was planning a cp /disk/gohome / and cp /disk/startup / after rm ing them ofcourse
mrgreaper #7
Posted 03 March 2012 - 11:06 PM
5) You can use turtle.detect(), this returns true if any block is infront of it; type 'help turtle' for a list of turtle functions.

6) Yes; but you'll have to keep track of when it turns, I think the API you're using has this.
7) You'll need to either restart the server, or restart the turtles individually.
7b) I wouldn't recommend editing the rom folder, though.

5) cool (is thier a non game version of the help? (im at work cant get away with loading it at mo lol, well maybe hmmm /me checks to see if coast is clear)
6) cool yeah just het me if your setting north there must be a way of seeing what way its facing ….i really must read that thread (hoping its one of about 30 i have open dealing with turtles lol)
7) doh
7b) i found this was the best way to give all players access to the apis with out having to explain to each how to load an api, specialy since we havent fully got the ftp stuff sorted yet, is thier ramifications to this method? (fairly new to computercraft)

edit found the thread, think if i have it save the pos every so often then set pos from the file then it should be ok if it reboots etc (i think) its annoying i cant really play around with it at mo to check these things… oh well more reading needed :unsure:/>/>
Liraal #8
Posted 03 March 2012 - 11:11 PM
6) use faceNorth() or getFacing() if you want to only get the direction
5) just open the file in notepad rom/help/turtle
Advert #9
Posted 03 March 2012 - 11:12 PM
5: You can download CC and go to lua/help, and the help files should be there.

7b: The only bad thing with modifying rom is that you'll have to restart the server/computers to fix things that are broken with it, e.g bugs in your code.
Liraal #10
Posted 03 March 2012 - 11:15 PM
you say there are bugs in MY code!? (yes, there probably are :unsure:/>/> )
mrgreaper #11
Posted 03 March 2012 - 11:20 PM
6) use faceNorth() or getFacing() if you want to only get the direction
5) just open the file in notepad rom/help/turtle

6) cool that will help a lot, just noticed your the developer of the api …cool api thank you
5) why didnt i think of that /me slaps head (in my defense its 2317 and i have been at work since 1600 lol)

5: You can download CC and go to lua/help, and the help files should be there.

7b: The only bad thing with modifying rom is that you'll have to restart the server/computers to fix things that are broken with it, e.g bugs in your code.
5) see 5 above lol
7b yeah the server restarts once day (more then that at mo due to over use lol so its not too much of an issue im guessing that on a server reboot all computers/turtles lose what they were doing and have to be turned on again anyway?
mrgreaper #12
Posted 03 March 2012 - 11:26 PM
you say there are bugs in MY code!? (yes, there probably are :unsure:/>/> )
(slight offtopic)
i bet theres 100% less bugs in your code then mine! i managed to completly freeze my bases computer when i disabled the ctrl + t and added the wireless detect while at the same time not letting the wireless detect work lol (i added it to the anti ctrl+t code so it would run in the background) …i fixed it but the other peoplewho wanted to use our processing facility were umm displeased with me (pitch forks and noses…though they couldnt get in… the lock down pc was frozen lol) all fixed now

love computercraft it adds so much to the game! the only thing i find scary is its so similier to BASIC that occasionly i slip into spectrum programming mode (yeah im that old) if a = 10 then gosub red … (and i find myself just tagging end into the end of the program till it works as i have no idea where i should be putting them lol )
Advert #13
Posted 03 March 2012 - 11:26 PM
7b: Yes, all computers will lose their current state when the server is rebooted; you can 'save' it's state by writing it down to a file, whenever it changes, and have the startup script restore it. tl;dr server restart -> all computers are rebooted fresh
mrgreaper #14
Posted 03 March 2012 - 11:50 PM
7b: Yes, all computers will lose their current state when the server is rebooted; you can 'save' it's state by writing it down to a file, whenever it changes, and have the startup script restore it. tl;dr server restart -> all computers are rebooted fresh

is thier a way of sending a power up command to a turtle, say the server goes off and reboots, the turtle is then off, can another terminal send a rednet signal to it to get it to turn on (like the magic packet to activate a real pc via wol) hmmm thinking about it since you have to open the modem to listen im guessing its not doable..shame hoping im wrong (it happens)
Advert #15
Posted 04 March 2012 - 12:04 AM
No, rednet cannot turn on computers; You can, however, use the peripheral library to turn it on (provided they are next to each other):


peripheral.call("side", "turnOn")
See: help peripheral ingame.

Though, when the server restarts, all the computers should remember their on/off state, they just don't remember anything else.
svennp #16
Posted 04 March 2012 - 02:30 AM
I would recommend SciTE as an editor, I find it more useful than notepad++.
Advert #17
Posted 04 March 2012 - 02:40 AM
I would recommend SciTE as an editor, I find it more useful than notepad++.


I would recommend the IDLua plugin for IDEA, but it's still alpha, and it's an IDE, and will take some time to set up.
Espen #18
Posted 04 March 2012 - 02:43 AM
I would recommend SciTE as an editor, I find it more useful than notepad++.
If anyone is torn between between SCiTE and Notepad++ and would like to know which one suits ones specific needs better, here is a pretty in-depth and useful comparison:
http://text-editor.pikimal.com/notepad-2/vs/scite

Both hold merit depending on what you need them for.
mrgreaper #19
Posted 04 March 2012 - 03:53 AM
well im not in a postion to test this, i am at home now but soo tired its stupid, this is what i came up with at work im not sure how to get stuff from get pos but once i am awake enough to use minecraft im sure i can test it. youll have to excuse my humour, i have tried to add lots of REM lines in to annotate it let me know if you spot any glaring bugs (errr i mean undocumented surprise features)

-- reference 77 285 286 303 144
function os.pullEvent()
 local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
 if event == "terminate" then
 os.reboot()
 end
 return event, p1, p2, p3, p4, p5
 end
function gohome()
 print ("Im off home")--i will make these print to a master terminal as well in the final version :unsure:/>/>
 magicTurtle.getPos()
 --find the y paramater (y is hieght i believe) we will pretend its y param
 y == yparam
 flyup()
 --ok so were at 120 lets go near the base
 magicTurtle.goToPos(19420,120,450,false) --not the actual cords but close enough for goverment work false so it wont break anything
 --now we need it to go down to 78
 print ("Descending")
 magicTurtle.goToPos(19420,78,450,false)
 --now to make it go to the door
 magicTurtle.goToPos(19420,78,440,false)
 --now to make it open the door
 print("knock knock, room for a poor old turtle?")
 rednet.open("back") --should be open already on the main script?
 rednet.send(303, "littlecomputerletmein")
 outerdock() -- right lets get the little turtle through the door
 indock() -- we wait for the door to close
 unload() -- unload the stuff
 print ("cycle complete, sleepy turtle sleep now?")
 sleep(60) 
 os.shutdown()
 end
function flyup()
 print ("up up  and away")
 if y == 120 then --can make that 250 when we get the anvil B)/>/> 
 else magicTurtle.up(1)
 flyup()
 end
 end
function outerdock()
 detect == turtle.detect()
 if detect == "false" then --make sure the doors open first wouldnt want him to bang his nose errr screen
 magicTurtle.goToPos(19420,78,438,false)
 else timer == timer + 1
 if timer == 60 then
 print ("ummm boss we got us a problem")
 else
 sleep(1)
 outerdock()
 end
 end
 end
function indock()
 detect2 == turtle.detectBack()
 if detect2 == "true" then --wait for the door to close behind us
 magicTurtle.goToPos(19410,77,435,false) -- go to its shelf
 faceEast() --face into the room with the back upagainst the filtier
 else timer2 == timer2 + 1
 if timer2 == 60 then
 print("come on close the door its cold in here")
 else
 sleep(1)
 indock()
 end
 end
 end
function unload()
 redpulse back 9 - unload all 9 slots
 print ("i feel as light as a feather now")
 end

im off to zzzzzz
Liraal #20
Posted 04 March 2012 - 06:20 AM
use something like

local x,y,z=magicTurtle.getPos()
Whoaaaaa #21
Posted 04 March 2012 - 01:02 PM
To get something in a chest, You'll need to have an Obsidian Pipe from BuildCraft, And then make some pipes from that leading into a chest.

-- Transport Turtle.
while turtle.detect() do
turtle.up()
turtle.forward()
turtle.drop()
end
while not turtle.detect() do
turtle.forward()
end
mrgreaper #22
Posted 04 March 2012 - 02:24 PM
ok this went wrong

-- reference 77 285 286 303 144
function os.pullEvent()
local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
if event == "terminate" then
os.reboot()
end
return event, p1, p2, p3, p4, p5
end
function gohome()
print ("Im off home")--i will make these print to a master terminal as well in the final version :unsure:/>/>
local x,y,z=magicTurtle.getPos()
flyup()
--ok so were at 120 lets go near the base
magicTurtle.goToPos(19590,120,489,false) --not the actual cords but close enough for goverment work false so it wont break anything
--now we need it to go down to 78
print ("Descending")
magicTurtle.goToPos(19590,78,493,false)
--now to make it go to the door
magicTurtle.goToPos(19590,79,423,false)
--now to make it open the door
print("knock knock, room for a poor old turtle?")
rednet.open("back") --should be open already on the main script?
rednet.send(303, "littlecomputerletmein")
outerdock() -- right lets get the little turtle through the door
indock() -- we wait for the door to close
unload() -- unload the stuff
print ("cycle complete, sleepy turtle sleep now?")
sleep(60)
os.shutdown()
end
function flyup()
--print ("up up  and away")
--if y == 120 then --can make that 250 when we get the anvil B)/>/>
--end
--else magicTurtle.up(1)
--flyup()
--end
end
function outerdock()
detect=turtle.detect()
if detect == "false" then --make sure the doors open first wouldnt want him to bang his nose errr screen
magicTurtle.goToPos(19590,79,421,false)
else
tim = tim + 1
if tim == 60 then
print ("ummm boss we got us a problem")
else
sleep(1)
outerdock()
end
end
end
function indock()
detect2=turtle.detectBack()
if detect2 == "true" then --wait for the door to close behind us
magicTurtle.goToPos(19495,79,417,false) -- go to its shelf
magicTurtle.Facenorth() --face into the room with the back upagainst the filtier
else tim2 = tim2 + 1
if tim2 == 60 then
print("come on close the door its cold in here")
else
sleep(1)
indock()
end
end
end
function unload()
--redpulse back 9 -- unload all 9 slots
print ("i feel as light as a feather now")
end
gohome()

if i un – the flyup function it just ends with 178

with it, it flys a fair bit of course

prints "descending"
flys further ofcourse
prints "knock knock, room of an old turtle?" (at this point it should be outside the door…its no where near (yes i setpos and yes i have the xyz the right way around)
then it ends with 178

wheres it getting 178 from?
whys it not going where it should?
what did i do wrong lol

also redpulse back 9 – unload all 9 slots errors with expected an = but works fine from the terminal when done seperatly thats why i have – it
Liraal #23
Posted 04 March 2012 - 02:53 PM
if detect == false
it's simply false/true, no quotations
mrgreaper #24
Posted 04 March 2012 - 03:10 PM
i rebooted the turtle so it could use the latest api….. arthmitec error, arghhhh it forgot its cords :unsure:/>/> ok it was doing its cords wrong but i was on magicTurtle api 1.25 ) this means every reboot i will have to remind every turtle where north is and where it is, thats not good (no offense is ment)
Liraal #25
Posted 04 March 2012 - 03:32 PM
save it to a file, using savePos() then after reboot recover with getPosF()
mrgreaper #26
Posted 04 March 2012 - 05:12 PM
save it to a file, using savePos() then after reboot recover with getPosF()

ah yes that would work, if i have it saving its cords every movement then load it on its start up then it will always be uptodate
though i confess i have no idea how to work with files (but then i havent looked into that aspect at all at mo)

the most worrying thing is it seems to not go to the right cords at mo, i need to get it to print out the cords it thinks its at i think so i can see where its going wrong, its a quiet night at work at mo so i should be able to do a bit of testing :unsure:/>/>

could you post a quick example of how you save the cords to a file and load them please?
Liraal #27
Posted 04 March 2012 - 05:17 PM
use just these functions, they're param-less, all is pre-set, position is saved i think in self-created /pos directory.
mrgreaper #28
Posted 04 March 2012 - 05:53 PM
use just these functions, they're param-less, all is pre-set, position is saved i think in self-created /pos directory.

found why it wasnt going to the right cords
/compass gives me the direction im facing as dictated by command book…..north of its opinion is not north by the driods opinion…. set it to the same way as f2 and all is good, i still had an athmetic error (when it got to the tim (timers) but then well im looking at it from BASIC language where unset veriables = 0 where as lua seems to class them as NIL
mrgreaper #29
Posted 04 March 2012 - 11:37 PM
ok this is what i have so far ( if figure if i share it all it may help others and you guys may spot any mistakes) this is far from the finished code though but all 3 scripts work so long as its not obstructed (ill get to that in the question part of my post lol)

first i got fed up with going into lua entering the cords making it face the right way etc so i wrote a config script called cfg


print ("manual config script for turtle reboot")
print ("enter x cords first number on minimap")
x = io.read()
x = tonumber(x)
print("enter y cords (height)")
y = io.read()
y = tonumber(y)
print("enter z cords last number")
z = io.read()
z = tonumber(z)
term.write ("set to ")
term.write (x..",")
term.write (y..",")
term.write (z)
function nf()
print ("")
print ("am i facing north now? yes/no")
q1 = io.read()
if q1 == "yes" then
magicTurtle.setNorth()
else
magicTurtle.turnLeft()
nf()
end
end
magicTurtle.setPos(x,y,z)
nf()
magicTurtle.savePos()
print ("all done")


then as each time it got into postion at my base i had to instruct it to leave by hand i wrote this

gp (goto pos cos when i called it goto it conflicted with a default program)

print ("lets send this turtle")
print ("enter x cords first number on minimap")
x = io.read()
x = tonumber(x)
print("enter y cords (height)")
y = io.read()
y = tonumber(y)
print("enter z cords last number")
z = io.read()
z = tonumber(z)
print ("mine on the way? true/false")
m = io.read()
term.write ("set to ")
term.write (x..",")
term.write (y..",")
term.write (z)
print ("")
print ("mining set to "..m)
print ("ok stand back and ill be on my way in 5")
sleep(5)
magicTurtle.goToPos(x,y,z,m)

then the main program itself the gohome script (rednet stuff untested yet)


-- reference 77 285 286 303 144
function os.pullEvent()
local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
if event == "terminate" then
os.reboot()
end
return event, p1, p2, p3, p4, p5
end
function gohome()
magicTurtle.savePos()-- for ease of use latter and incase of crash
tim=0
tim2=0
print ("Im off home")--i will make these print to a master terminal as well in the final version :unsure:/>/>
local x,y,z=magicTurtle.getPos()
flyup()
--ok so were at 120 lets go near the base
magicTurtle.goToPos(19590,120,489,false) --not the actual cords but close enough for goverment work false so it wont break anything
--now we need it to go down to 78
print ("Descending")
magicTurtle.goToPos(19590,78,493,false)
--now to make it go to the door
magicTurtle.goToPos(19590,79,423,false)
--now to make it open the door
print("knock knock, room for a poor old turtle?")
rednet.open("back") --should be open already on the main script?
rednet.send(303, "littlecomputerletmein")
outerdock() -- right lets get the little turtle through the door
indock() -- we wait for the door to close
unload() -- unload the stuff
print ("cycle complete, sleepy turtle sleep now?")
sleep(60)
os.shutdown()
end
function flyup()
print ("Up up and awaaaaay")
magicTurtle.savePos()-- for ease of use latter and incase of crash
local x,y,z=magicTurtle.getPos()
magicTurtle.goToPos(x,120,z,true)
--if y == 120 then --can make that 250 when we get the anvil B)/>/>
--end
--else magicTurtle.up(1)
--flyup()
--end
end
function outerdock()
magicTurtle.savePos()-- for ease of use latter and incase of crash
detect=turtle.detect()
if detect == false then --make sure the doors open first wouldnt want him to bang his nose errr screen
--magicTurtle.goToPos(19590,79,421,false) --gets a bit confused bless him
magicTurtle.forward(2) --1 into the hole 1 through it)
else
tim = tim + 1
if tim == 60 then
print ("ummm boss we got us a problem")
else
sleep(1)
outerdock()
end
end
end
function indock()
magicTurtle.savePos()-- for ease of use latter and incase of crash
magicTurtle.faceSouth() --faces the door as thier is no detect back (oops)
detect2=turtle.detect()
if detect2 == true then --wait for the door to close behind us
-- magicTurtle.goToPos(19495,79,417,false) -- api dosnt like going to cords in a confined space
magicTurtle.faceNorth() --face away from the door
magicTurtle.forward(4) -- fly 4 squares into the room
magicTurtle.faceEast() -- so he is looking at his docking station
magicTurtle.forward(5) -- fly to his docking port
magicTurtle.faceWest() -- face into the room with his back resting on the filtier
magicTurtle.savePos()-- for ease of use latter and incase of crash
else tim2 = tim2 + 1
if tim2 == 60 then
print("come on close the door its cold in here")
else
sleep(1)
indock()
end
end
end
function unload()
magicTurtle.savePos()-- for ease of use latter and incase of crash (though this should be the same as outerdock one)
--redpulse back 9 -- red pulse doesnt work from scripts
redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
  redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
sleep(1)
print ("i feel as light as a feather now")
end
gohome()

notes:
seeing the turtle face the open door and watch it till it closed was a cool side feature just looks good, as does seeing it coming in to dock (memories of elite dar darrrrr da dar dar, dar dar (old gamers will know the tune im humming)
all the print messages will be going to a terminal in my base (eventualy up on a big screen dan showed in 1.31 preview pic (man that looks good)

questions:
1) how do i tell it to go around obsticles when it is obstructed during a gopos command? or at least error out and yell for help ? (if i could make it run another function if obstructed then i could have it broadcast its cords to a base computer (cant wait for those big terminals! help help turtle on its shell at x y z B)/>/> )
2) is there a way to make it use cords out of text file instead of the ones i have hard coded ? (would make it easier for others that may want to use my script)
3) why oh why does redpulse not work in a script?
4) ok i have the go home program but how do i call the program from another program? (so when the turtle is full or recieves the recall signal it executes gohome

also thnx for the help thus far guys, with out you and this forum i wouldnt of been able to get as much as i have working!
Liraal #30
Posted 05 March 2012 - 05:47 AM
1) Not as of yet, but that should be simple enough to implement in the near future.
2) Same as above.
4) shell.run(programpath)