Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6472931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:24:16+00:00 2026-05-25T06:24:16+00:00

I am working on a autohotkey script that will allow me to select text/code

  • 0

I am working on a autohotkey script that will allow me to select text/code tomy clipboard and hit a keyboard combination, it will then post it as a new entry on the pastbin.com website under my account and return the URL for the new pastebin.com entry to my clipboard.

So far I have it working great with 1 exception. Below is my autohotkey code…

; ******* INFO *******
; < Pastebin.com copy/paste> - Instantly share your code on pastebin.com
; SCRIPT FUNCTION: Press hotkey (ctrl+shift+c) to save selected text to  pastebin.com


; ******* Initiate script *******
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force


; ******* Hotkeys - Post Code and Get URL *******
^+c::
Send ^c
ClipWait
pastestring:=ClipBoard

api_user_key:="cd25-CHANGED-7c0158bgg06a91e617"
api_dev_key:="24-CHANGED-eecedghb97f35"
URL:="http://pastebin.com/api/api_post.php"

POSTDATA := "api_paste_code=" pastestring "&api_user_key=" api_user_key "&api_paste_name=" filename "&api_paste_private=1&api_paste_format=php&api_dev_key=" api_dev_key "&api_option=paste"

html := httpQUERY(URL,POSTDATA)
Clipboard:=html
TrayTip, AHKClipper, Added %Html%, 2, 1

The real magic happens with the

function call to httpQUERY(URL,POSTDATA)

The code for that function is in the file located here…
http://pastebin.com/Bcb3ELPE I posted it on there because it is like 200+ lines and isn’t really needed to answer this question.

Now the problem is for my script above to work, I have to include the contents of the httpquery.ahk file into my own .ahk file above.

Isn’t there some way to include that file into it without having all that code cluttered into my own file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:24:17+00:00Added an answer on May 25, 2026 at 6:24 am

    I seem to have it working by including the other file like this

    #include HTTPQuery.ahk
    

    I didn’t know you could do this

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a project that parses a log of events, and then updates a
Working on a little Ruby script that goes out to the web and crawls
Working with a SqlCommand in C# I've created a query that contains a IN
I'm writing a script in AutoHotKey, and I've stumbled upon an impasse. Right now
Working on an extension that use the new experimental devtools apis. How do you
I have an INI file that has been created by an AutoHotKey program written
Working SQL The following code works as expected, returning two columns of data (a
Working with COM interop, I can call a managed function from within unmanaged code.
Working with an API that can handle multiple connections (i.e. sessions), each of these
working on an old translation sample code for windows phone 7. Recently, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.