PDA

View Full Version : VERY annoyed - won't work



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.

chineseartist
13-04-2007, 01:43 PM
is this a scripkt for a habbo fake login or am i blind lol??? u need to put .jar instead of the nokia one

WiseBen
13-04-2007, 01:44 PM
No it's not a script for Habbo I mean scripting as in Javascript or VBscript in this case javascript. And no it is .vcs as the file extension :P

LondonGoons
13-04-2007, 01:46 PM
is this a scripkt for a habbo fake login or am i blind lol??? u need to put .jar instead of the nokia one

Are you BLIND or would a staff who help desk manager would make a fake login?

WiseBen
13-04-2007, 01:48 PM
Are you BLIND or would a staff who help desk manager would make a fake login?

Lol :P

chineseartist
13-04-2007, 01:49 PM
dont -rep im sorry it just look similar to [wot] fake login script

Drompo
13-04-2007, 02:03 PM
You shouldn't know what one of those looks like.

Sorry I checked it and i can't find any errors

CJ-real
13-04-2007, 08:06 PM
another. YET ANOTHER thread that starts to go off topic.

also if you are using WRITE or get then you may need to chMOD

WiseBen
13-04-2007, 09:09 PM
Do i need to CHMOD? Because this is on my home computer i am creating the script for, so that i can create files on my computer and then open them in my bluetooth program which sends them to my phone

Dentafrice1
13-04-2007, 09:16 PM
Maybe you need to enable it for sharing?

ScottDiamond
13-04-2007, 09:35 PM
You'd need the %20 or whatever shizzle instead of spaces, that's why it will not be finding the file. And why the hell would you need to CHMOD?

WiseBen
13-04-2007, 09:39 PM
I tried that scott but it still wouldn't work (grr) and yeah that's what i thought also about CHMOD ;l
I also realised why it was permission denied, because i had created the file and didn't refresh the script, so the script was still using the file and 2 programs sometimes can't use one file at the same time.

ScottDiamond
13-04-2007, 09:43 PM
try uploading it to a website, it might be the fact you're not running off a server. (unless you have your own server in your PC.)

Splinter
13-04-2007, 09:57 PM
CHMod im pretty sure is a Linux unique way of setting permission on files. Something that dosent exist on windows.

ScottDiamond
13-04-2007, 10:04 PM
CHMod im pretty sure is a Linux unique way of setting permission on files. Something that dosent exist on windows.

Bang on the head of the nail.

Tomm
14-04-2007, 08:17 AM
As far as I am aware for security javascript can't access files on the users PC.

timROGERS
14-04-2007, 09:46 AM
As far as I am aware for security javascript can't access files on the users PC.

Just what I was thinking :P Think of the problems if it could - people could view your Windows key :P

WiseBen
14-04-2007, 10:49 AM
nonono i'm making a HTML applications using a .hta extension which is a trusted file by windows so security isn't a problem, it's just i can't get the syntax right lol which is irritating.
So what i need is to be able to open a file with a certain program using javascript, does anyone have that code? Imagine that i've already defined shell like i have above, so it should be something like
ishell.run "c:/blahbla/applicationname.exe" "c:/filename/folder/file.extension"
but i can't get it right, i've tried googling it and everything :@

Rix
14-04-2007, 11:15 AM
CHMod im pretty sure is a Linux unique way of setting permission on files. Something that dosent exist on windows.
Lmao windows servers use them for things like ftp etc:P

CJ-real
14-04-2007, 11:38 AM
Well didnt say anything about on the home PC though :S - and most things are really stupid with permission files, so they wont work

Tomm
14-04-2007, 12:46 PM
Err no. I operate a windows server and it does not use it.

Example (Actual log from my server):

> SITE chmod 777 /site/Default.aspx
< 500 'SITE chmod 777 /site/Default.aspx': command not understood


Lmao windows servers use them for things like ftp etc:P

Want to hide these adverts? Register an account for free!