WiseBen
13-04-2007, 01:41 PM
Hi, i'm making a reminders script so that i can create a reminder, it then makes this file in a .vcs file (nokia calendar file), and then runs this in my bluetooth program which automatically sends it to my phone.
Except... OH WHAT A SHOCK.. IT WON'T WORK
All of the input1.value etcc is just other things which aren't relevant as they already work, but here is the script i am using:
<script type="text/javascript">
function createcard()
{
var card=input1.value+description.value+input2.value+y ear.value+month.value+day.value+hour.value+minute. value+'00'+input3.value+year.value+month.value+day .value+hour.value+minute.value+'00'+input4.value+y ear.value+month.value+day.value+alarmhour.value+al armminute.value+'00'+input5.value
var ifso=new ActiveXObject("scripting.filesystemobject");
var ishell=new ActiveXObject("wscript.shell");
var desktoppath=ishell.SpecialFolders("Desktop");
var a = ifso.CreateTextFile(desktoppath+"/Reminder.vcs",true)
a.write(card)
ishell.run('"C:\Program Files\Belkin\Bluetooth Software\btsendto_explorer.exe" "C:\Documents And Settings\Ben\Desktop\Reminder.vcs"', 1, true );
}
</script>
I get 2 errors, one saying permission denied, one saying that the file wasn't found.
The file is there, made already so that's total rubbish.
It also says that permission is denied... WHY?
The lines it gives me for these errors are false as one of the lines given has </table> written on it (OMG WHAT AN ERROR MAKER)
And the other line has </td> on it so what a surprise, another LIE.
Any help? This is absolutely ridiculous and making me extremely annoyed :P as you can probably tell.
So the thing i need is:
How to run a file in a specified program using javascript.
Except... OH WHAT A SHOCK.. IT WON'T WORK
All of the input1.value etcc is just other things which aren't relevant as they already work, but here is the script i am using:
<script type="text/javascript">
function createcard()
{
var card=input1.value+description.value+input2.value+y ear.value+month.value+day.value+hour.value+minute. value+'00'+input3.value+year.value+month.value+day .value+hour.value+minute.value+'00'+input4.value+y ear.value+month.value+day.value+alarmhour.value+al armminute.value+'00'+input5.value
var ifso=new ActiveXObject("scripting.filesystemobject");
var ishell=new ActiveXObject("wscript.shell");
var desktoppath=ishell.SpecialFolders("Desktop");
var a = ifso.CreateTextFile(desktoppath+"/Reminder.vcs",true)
a.write(card)
ishell.run('"C:\Program Files\Belkin\Bluetooth Software\btsendto_explorer.exe" "C:\Documents And Settings\Ben\Desktop\Reminder.vcs"', 1, true );
}
</script>
I get 2 errors, one saying permission denied, one saying that the file wasn't found.
The file is there, made already so that's total rubbish.
It also says that permission is denied... WHY?
The lines it gives me for these errors are false as one of the lines given has </table> written on it (OMG WHAT AN ERROR MAKER)
And the other line has </td> on it so what a surprise, another LIE.
Any help? This is absolutely ridiculous and making me extremely annoyed :P as you can probably tell.
So the thing i need is:
How to run a file in a specified program using javascript.