Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

AHK Sendinput from txt files?


  • Please log in to reply
5 replies to this topic
SkrillexAkaCraft
  • Members
  • 45 posts
  • Last active: Jan 04 2018 06:02 PM
  • Joined: 04 Feb 2015

I wonder if there is a way to let a script write text wich is found in a .txt file or if there is a way to let a user place his message in a inputbox wich the script should write in a chatbox or something simmilar to that.

 

 

 

 

 

So lets say a user is playing a game and is selling items he/she can enter example: Sellin x1 of water x2 of beer Wishper me

 

 

 

so He/She did fill that in in the input box then presses start and the script starts sending the whole stuff 



revMARKbrown
  • Members
  • 6 posts
  • Last active: Oct 27 2015 01:15 AM
  • Joined: 23 Oct 2015

I don't quite get it.  I know it is possible.  I just can't understand what you want.  A gui can be created to fill in waht you want to save let's say to a notepad txt file. And then the same gui can send it where ever you want.  OR OR anything you type to notepad can be coded to send anywhere.. sentence, word or paragraph.  

 

There are a few scripts that do this.  I am not an expert but have done it several times.. 



SkrillexAkaCraft
  • Members
  • 45 posts
  • Last active: Jan 04 2018 06:02 PM
  • Joined: 04 Feb 2015

I don't quite get it.  I know it is possible.  I just can't understand what you want.  A gui can be created to fill in waht you want to save let's say to a notepad txt file. And then the same gui can send it where ever you want.  OR OR anything you type to notepad can be coded to send anywhere.. sentence, word or paragraph.  

 

There are a few scripts that do this.  I am not an expert but have done it several times.. 

so lets say i type this in a txt file

 

 

HELLO WORLD!

 

 

 

then i let my script read what i did write in that and then it will send it to the client or chatbox where i want it to appear



Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
inputbox, MyVariable
Return

F2::
Send, %MyVariable%
Return
Or

fileRead, MyFileContent, c:/Some/file/path.txt
Return

F2::
Send, %MyFileContent%
Return
Hope it helps
Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

SkrillexAkaCraft
  • Members
  • 45 posts
  • Last active: Jan 04 2018 06:02 PM
  • Joined: 04 Feb 2015
inputbox, MyVariable
Return

F2::
Send, %MyVariable%
Return
Or

fileRead, MyFileContent, c:/Some/file/path.txt
Return

F2::
Send, %MyFileContent%
Return
Hope it helps

 

 

 

 

 

 

This is what i got now

 

 

 

Inputbox:
Gui, Input:-Caption
Gui, Input:Add, Text, x0 y0 w443 h40 +BackgroundTrans gUImove4
Gui, Input:Add,  Picture, x468 y4  +BackgroundTrans gclose4 , Lib\Script_Images\exitcross.png
Gui, Input:Add, Picture, x0 y0 +Background, Lib\Script_Images\VIIPaydayscript.png
Gui, Input:Add, Text, x76 y10 w130 h50 +BackgroundTrans cWhite, Type What you want to spam each 40 seconds!
Gui, Input:Add, Edit, x216 y10 w250 h50 vTyping, Text to be typed
Gui, Input:Add, Picture, x25 y115 w80 h30 +BackgroundTrans gBEGINBOT, Lib\Script_Images\start.png
Gui, Input:Add, Picture, x109 y115 w80 h30 +BackgroundTrans gEXIT, Lib\Script_Images\stop.png
Gui, Input:Font, cWhite  s10 Q5 , Century Gothic
Gui, Input:Add, Text, x220 y74 cWhite BackgroundTrans vT1, 00:00:00
Gui, Input:Font, cWhite  s10 Q5 , Century Gothic
Gui, Input:Add, Text, x120 y100 w250 cWhite +Center BackgroundTrans vgui_status, Initiating
Gui Input:+AlwaysOnTop +ToolWindow
Gui, Input:Show, w500 h147
Return
 
uiMove4:
PostMessage, 0xA1, 2,,, A 
Return
 
Close4:
Gui, Input:Destroy
return


SkrillexAkaCraft
  • Members
  • 45 posts
  • Last active: Jan 04 2018 06:02 PM
  • Joined: 04 Feb 2015

Becouse of the reply not letting me put all code I want the box where the user did type in staying on top becouse of having a timer + status part on it

 

The timer stops timing at 00:00:01 and the status stands still on Setting Everything up! :/

 sleep 5000
 gosub PPCHECK2
 
PPCHECK2:
gui_status:="Spamming?" ;Current status
 {
send {Enter}
sleep 200
;Gui, Submit
;Gui, Input:Show
Send %Type%{Enter}
sleep 1000
;send {Enter}
}
gosub SLEEP
return
 
SLEEP:
gui_status:="40 Second Break" ;Current status
{
sleep 40000
}
gosub PPCHECK2
return