OK…. My client would like to have the results of their test (Tiggs) to be copied to a .txt doc and then save that .txt to the end users Desk Top. Hummmm any ideas?
Announcement
Collapse
No announcement yet.
Open text doc. and save to Desk Top
Collapse
X
-
Re: Open text doc. and save to Desk Top
LOL Ok... One word:
WHAT! lol. how about just a few more words.
Here's what I have going on:
I need from the test...
%SelectedAnswers%
%FinalScore%
and a date of some kind on the text file. I tried your three word answer but it didn't fly for me. Where do I put your info, which boxes?
Thx Lorne.
Comment
-
-
Re: Open text doc. and save to Desk Top
Bruce,
How about:
%Date% = System.GetDateTime ( "Date", "North American Date")
%TextFileData% = "%Date% %SelectedAnswers% TOTAL: %FinalScore%"
TextFile.Write ("%Desktop%\TestResults.txt", "%TextFileData%")
or in cut-and-pastable code:
<IR_ACTIONS_LIST>
<Action name="Get Date Time">
<Type>139</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%Date%</Variable>
<ReturnType>0</ReturnType>
<Date>0</Date>
<Time>0</Time>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%TextFileData%</Variable>
<Value>%Date%
%SelectedAnswers%
TOTAL: %FinalScore%</Value>
<Evaluate>0</Evaluate>
</Action>
<Action name="Write">
<Type>32</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%Desktop%\TestResults.txt</FileName>
<DataToWrite>%TextFileData%</DataToWrite>
<IfFileExists>0</IfFileExists>
</Action>
</IR_ACTIONS_LIST>
Comment
-
-
Re: Open text doc. and save to Desk Top
RTFM?
--[[ Indigo Rose Software Developer ]]
Comment
-
-
Re: Open text doc. and save to Desk Top
Being an Instructor I usually use the RTFM in my classes as an "If all else fails . . ." scenario.
I however change the well known version of RTFM to mean
Read The Free Manual as all of the manuals for our products ship on the CD with the product. :-)TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
Re: Open text doc. and save to Desk Top
It depends what you (or the user) wants to do.
First off, %DesktopNT% is only needed on NT, so if it isn't NT4/2K/XP, just use %Desktop%.
If it is an NT OS, then use %Desktop% if you only want the text file to appear on the current user's desktop, or use %DesktopNT% if you want the text file to appear on all users' desktops.
As to which you should use, you could ask the user, but it probably makes more sense in this case to use %Desktop%, since I assume none of the other users need to see the current user's test results.--[[ Indigo Rose Software Developer ]]
Comment
-
-
Re: Open text doc. and save to Desk Top
No, as apposed to the desktops of all users on that system. This has nothing to do with the network.
You know how different users can log into a PC? Under NT/2K/XP, each user has their own settings, their own My Documents folder, their own desktop folder, etc. The user-specific desktop folder is what %Desktop% is referring to.
If you log into your PC as Bruce, and copy a file onto your desktop, it goes into a path like this:
C:\Documents and Settings\Bruce\DESKTOP
If you log in as Samantha, and copy a file onto your desktop, it goes here instead:
C:\Documents and Settings\Samantha\DESKTOP
If you log in as Bruce, you can't see the files on Samantha's desktop, and vice-versa.
In both cases, that's %Desktop%. If you're logged in as Bruce, %Desktop% will be C:\Documents and Settings\Bruce\DESKTOP. If you're logged in as Samantha, %Desktop% will be C:\Documents and Settings\Samantha\DESKTOP.
Now, %DesktopNT% points to a path like this:
C:\Documents and Settings\All Users\DESKTOP
Any files put there are seen by all users. So, if you copied a file into that path, it would be on the desktop if you logged in as Bruce, and it would also be there if you logged in as Samantha.
--[[ Indigo Rose Software Developer ]]
Comment
-
Comment