Jump to content

Help making a code


Recommended Posts

This might sound strange, I have no knowledge on Autoit... I needed to automate an action, which was a complete pain to do. I knew there was AutoIt, the easier to use, and I tought I could give it a try.

I have been reading some things, and tried to start doing by my self, and this is what I made so far:

Func Loading_values()
 If FileExists ( "C:\Documents and Settings\User\Desktop\test.txt" ) Then
 FileOpen ("test.txt", 0)
 Sleep (750)
 Send ("{SHIFTDOWN}" & "{END}" & "{DOWN 64}" & "{SHIFTUP}" & "{APPSKEY}" & "{c}" & "{DEL}")
 EndIf
EndFunc

I'm finding it really hard, and I don't know if there's anyone willing to help me/make the code for me, but otherwise I can't do the action by my self, would take lots of hours... what I need to do is open a .txt file, copy the first 64 lines inside, delete them from the .txt, save the changes, open a web site, paste the lines inside a box at left side, copy the result lines at a box right side, open another .txt file, paste the lines, save the changes, toggle back to the first .txt file, and repeat the entire process over and over again, toggling from .txt to browser to .txt. I need this to be done at least 400 times, then stop and end script.

I understand both .txt files and web site can be opened at first, then proceed toggling, so nothing is extra complicated... I also know 400 times is a lot, not sure if it can be done, but I'll be happy if it can be done 10 times.

If you would like to chat with me to give me a hand, message me your Skype or request mine, I'll be more than glad to. Thanks in advance!

Link to comment
Share on other sites

This is the best I'll do for you.  If it was more fun, I'd create the script, but it's not:

_FileReadToArray
_FileWriteFromArray
_IECreate
$o = _IEGetObjById
_IEFormElementSetValue($o,$a)

 

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Hi Aramis, welcome to the forum.

Sorry to let you down, but there is a certain level of complexity to what you ask that is clearly not apparent to a beginner. So in a very real sense, you need to learn to walk before you can run.

Most of those who volunteer their help here, do so with the idea that we help a coder to help themself, and as such don't just provide code on demand. Much like teaching someone to fish, so they can then fish to feed themself.

To teach you what you need to know for your code request, at your current level of understanding, would take quite some time, hours if not days and weeks. I recommend you try the tutorials that are available and see how things progress from there.

If you need this program script urgently, then there are websites and coders out there, who may be able to do it for you, though they will likely charge a fee. We do not engage in that here, though any coder here seeing your request, may contact you by PM to offer their services.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

To get you started, here is some modified code to work like I imagine you thought it would.

$sPath = "C:\Documents and Settings\User\Desktop\test.txt"
$sFile = "test.txt"

Loading_values()

Func Loading_values()
    If FileExists($sPath) Then
        ShellExecute($sPath)
        WinWaitActive($sFile)
        Sleep(750)
        Send("{SHIFTDOWN}" & "{END}" & "{DOWN 64}" & "{SHIFTUP}" & "{APPSKEY}" & "{c}" & "{DEL}")
    EndIf
EndFunc   ;==>Loading_values

 

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

17 hours ago, jdelaney said:

This is the best I'll do for you.  If it was more fun, I'd create the script, but it's not:

_FileReadToArray
_FileWriteFromArray
_IECreate
$o = _IEGetObjById
_IEFormElementSetValue($o,$a)

 

 

7 hours ago, TheSaint said:

Hi Aramis, welcome to the forum.

Sorry to let you down, but there is a certain level of complexity to what you ask that is clearly not apparent to a beginner. So in a very real sense, you need to learn to walk before you can run.

Most of those who volunteer their help here, do so with the idea that we help a coder to help themself, and as such don't just provide code on demand. Much like teaching someone to fish, so they can then fish to feed themself.

To teach you what you need to know for your code request, at your current level of understanding, would take quite some time, hours if not days and weeks. I recommend you try the tutorials that are available and see how things progress from there.

If you need this program script urgently, then there are websites and coders out there, who may be able to do it for you, though they will likely charge a fee. We do not engage in that here, though any coder here seeing your request, may contact you by PM to offer their services.

 

6 hours ago, JohnOne said:

To get you started, here is some modified code to work like I imagine you thought it would.

$sPath = "C:\Documents and Settings\User\Desktop\test.txt"
$sFile = "test.txt"

Loading_values()

Func Loading_values()
    If FileExists($sPath) Then
        ShellExecute($sPath)
        WinWaitActive($sFile)
        Sleep(750)
        Send("{SHIFTDOWN}" & "{END}" & "{DOWN 64}" & "{SHIFTUP}" & "{APPSKEY}" & "{c}" & "{DEL}")
    EndIf
EndFunc   ;==>Loading_values

 

Thank you for your responses, I don't need this urgently, but as soon as I can... I'd really like to learn how to do it by my self, but that would take quite a while.. a long while. I guess my best option is get someone  to do it for me, for free or for some bucks. So if anyone is interested, for free or paid, PM me and I'd be really thankful. Again, thank you for your time and sincere answers!

Link to comment
Share on other sites

4 hours ago, JohnOne said:

What is the website?

This is the web site: <snip>

You can see left side is a box to set values, and when you do so, instantly, right side shows the results (you don't need to click any button, only paste values left side and copy results right side). Note that this site didn't work for me on Chrome, but it did on Mozilla...

Edited by JLogan3o13
Link to comment
Share on other sites

  • Moderators

@Aramis an MD5 cracker is obviously something we're not going to support here. Please read the forum rules before you post again.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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