Jump to content

Add row to table in Access97 then fill it in?


Falling
 Share

Recommended Posts

As far as that goes...

$password = "1$2()!xymA"

I do not see a reason to put the String() around it.

Are you still interested in the @ComSpec? I am assuming not since you have already gone ahead with that script you found.

Hope this helps,

JS

<{POST_SNAPBACK}>

I tried it that way first ($password ="1$2()!xymA" ), that did not work either.

I also tried to send each character individually one at a time with a small sleep between. that did not work.

I'm woundering if one of those Symbols are special? Or maybe access has some kind of weird protection?

......

I still am interested i'm just doing this now cause i don't know how to use @ComSpec I've asked 3 times now for someone to actually explain it to me and no one ever does. They say read the help file and as I said before the help file on that subject sucks. there are no good examples and the example they give don't tell you jack. Maybe it does tell you stuff, but not in a language i get anyway.

Edited by Falling
Link to comment
Share on other sites

Copy and paste the following...

#include "launch.au3"
sleep(500)
_LaunchSomeThing("C:\Documents and Settings\charles\My Documents\autotest\ServerDB.mdb")
WinWait("Password Required")
$password = "1$2()!xymA"
Send("" & $password)
sleep(1500)
Send("{ENTER}")

Try that let me know while I write a bit about @ComSpec.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Copy and paste the following...

#include "launch.au3"
sleep(500)
_LaunchSomeThing("C:\Documents and Settings\charles\My Documents\autotest\ServerDB.mdb")
WinWait("Password Required")
$password = "1$2()!xymA"
Send("" & $password)
sleep(1500)
Send("{ENTER}")

Try that let me know while I write a bit about @ComSpec.

JS

<{POST_SNAPBACK}>

I tried it then thought I'd find out what Send was actually sending. So I sent i to wordpad instead.

here are the results: 1$2()xymA

It skips !x for some reason.

I tried this on multiple other passwords.

It always skips any ! and the first character that follows the !.

is that a bug?

Link to comment
Share on other sites

Okay here is the @ComSpec...

$db = 'ServerDB.mdb'
$docs = 'cd My Documents'
Run(@ComSpec & " /c " & $docs,'',@SW_SHOW)
Run(@comspec & " /c Start " & $db,'',@SW_MAXIMIZE)

That should open your database right up.

@josbe thanks I wouldnt have thought of that for a long while yet :ph34r:

@Falling here is your code as it should go...

$db = 'ServerDB.mdb'
$docs = 'cd My Documents'
Run(@ComSpec & " /c " & $docs,'',@SW_SHOW)
Run(@comspec & " /c Start " & $db,'',@SW_MAXIMIZE)
WinWait("Password Required")
$password = "1$2()!xymA"
Send("" & $password, 1)
sleep(1500)
Send("{ENTER}")

Try it and let me know,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Okay here is the @ComSpec...

$db = 'ServerDB.mdb'
$docs = 'cd My Documents'
Run(@ComSpec & " /c " & $docs,'',@SW_SHOW)
Run(@comspec & " /c Start " & $db,'',@SW_MAXIMIZE)

That should open your database right up.

@josbe thanks I wouldnt have thought of that for a long while yet :ph34r:

@Falling here is your code as it should go...

$db = 'ServerDB.mdb'
$docs = 'cd My Documents'
Run(@ComSpec & " /c " & $docs,'',@SW_SHOW)
Run(@comspec & " /c Start " & $db,'',@SW_MAXIMIZE)
WinWait("Password Required")
$password = "1$2()!xymA"
Send("" & $password, 1)
sleep(1500)
Send("{ENTER}")

Try it and let me know,

JS

<{POST_SNAPBACK}>

Nope says's cannot find the file. Maybe because it is in MyDocuments/autotest?

anyway i still don't understand how @ComSpec Works. Could you explain to me what it is doing?

Link to comment
Share on other sites

Nope says's cannot find the file.  Maybe because it is in MyDocuments/autotest?

anyway i still don't understand how @ComSpec Works.   Could you explain to me what it is doing?

<{POST_SNAPBACK}>

Okay first to get your code right... I forgot the part it is in autotest. Let me put that in and you go from there...

I will explain what it is doing after I show the working code.

$db = 'ServerDB.mdb'
$docs = 'cd My Documents'
$docs2 = 'cd autostart'
Run(@ComSpec & " /c " & $docs,'',@SW_HIDE)
Run(@ComSpec & " /c " & $docs2,'',@SW_HIDE)
Run(@comspec & " /c Start /max " & $db,'',@SW_HIDE)
WinWait("Password Required")
$password = "1$2()!xymA"
Send("" & $password, 1)
sleep(1500)
Send("{ENTER}")

What I am doing first is declaring variables as I am sure you know...

Second... Run(@ComSpec & " /c ",'',@SW_SHOW) opens the command prompt for the current user. I use the $docs and $docs2 to navigate the command prompt to the proper folder.

Then in command prompt if you type start and a file name then it will open that file if it is in the proper folder. Instead of having so many lines I do believe you could do the following...

Run(@ComSpec & " /c Start C:\Documents and Settings\charles\My Documents\autotest\ServerDB.mdb",'')

I didnt test that code but you may want to try it.

Let me know if you need more of an explanation.

JS

Edit: I changed the final run to open the database full screen, and hid the command window. Let me know if this works...

Thanks,

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Wow, a ton of help flooded in before I got back to answer, but here goes.

Scriptkiddy could you explain to me what @ComSpec is doing exactly?

does mydatabase.mdb have to be in my start menu??

@comspec is the Secondary Command Interpreter. What this does is basically open up a command line and runs your code.

Lets Break down this:

Run(@comspec & " /c Start " & $db,'',@SW_MAXIMIZE)

The first part opens up the command line, and it should be noted that the " /c " part is very important.

The /c is the part that tells the Command interpreter to carry out the string and then terminate. there are over a dozen more switches, and you can find them by running the command interpreter with a /? for help.

In windows 2k or XP, start then run then cmd and then in your dos box type cmd /? There are a few pages of info.

So you are starting the command interpreter and passing the switch /c and then start

the START part will open a separate window to run a specified program or command.

Don't get this mixed up with the start menu.

This tells Windows to run your file with the associated program just as if you double clicked it, or right clicked and used OPEN.

The last part is the directory to start in, and how to open it.

'',@SW_MAXIMIZE)

This is not how your final program will open, only how the Comspec Dos Box will open.

I prefer to open it minimised or hidden myself, as a big black dosbox is a bit anoying for me. So I would use SW_Minimize or SW_Hide.

Well I hope that explains it...

for a bit more info on START, you can always look at its built in help.

Run(@comspec & ' /c Start /?','',@SW_MAXIMIZE)

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...