PDA

View Full Version : Creating a text document on the desktop



liquidsleep
05-03-2007, 08:44 AM
Hi everyone,

I am a rookie here, this is the second time I have worked with APMS in 2 years. I have been asked by my employer to create an app for our field technicians to use when working on various computers. I need to make a button to add a text file to the desktop for documentation purposes. This all sounds simple to right click the desktop and knock out the .txt, but I did spend 30 minutes the other week walking a tech through that process. I have to make things stupid simple for our guys or else they mess everything up.

Here is the following code that I have been trying to use with no progress.

TextFile.WriteFromString("%Desktop%\\service_history.txt", "Hello, world.", false);

Thanks in advance

bule
05-03-2007, 09:04 AM
TextFile.WriteFromString(_DesktopFolder.."\\service_histo ry.txt", "Hello, world.", false);

liquidsleep
05-03-2007, 09:57 AM
Bule,

thanks a lot, worked like a charm. You wouldn't happen to know of any sites covering basic lua scripting.

Thanks again,

Ty

bule
05-03-2007, 11:47 AM
Well, _DesktopFolder is not a default Lua variable, it's APMS feature (variable set by a runtime).

Nevertheless, try this link:
http://www.lua.org/manual/5.0/