mithandir1 Posted September 23, 2008 Share Posted September 23, 2008 (edited) I have a program that gives me offsets and file sizes of files compressed in a .pak file. I have written a scripts that converts the beginning offset from hexadecimal to decimal and adds the file size to give me the both offsets in decimal. I am now attempting to make the script automatically copy the outputs to the clipboard so that I can simply paste them to a text file. I need the output copied to the clipboard in this format: beginning,ending Here is what I have tried I am rather stumped since I have never tried anything with the clipboard before. expandcollapse popup#include <ClipBoard.au3> HotKeySet("{esc}", "Terminate") call("main") func main() while 1 If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer local $hex_valure = InputBox("Offset Calculator","Enter Starting Hex Value",""," ","100","50","1","1") Select Case @Error = 0 Case @Error = 1 Case @Error = 3 EndSelect If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer local $bytes = InputBox("Offset Calculator","Enter File Size",""," ","100","50","1","1") Select Case @Error = 0 Case @Error = 1 Case @Error = 3 EndSelect local $dec = Dec($hex_valure) local $fileend = ($dec + $bytes) if $dec = 0 Then MsgBox(0,"ERROR","INVALID OFFSET!") exitloop endif _ClipBoard_SetData ($dec,$fileend);I want this copied to the clipboard in text format with a comma separating the 2 values wend call ("main") endfunc Func Terminate() Exit 0 EndFunc Edited September 23, 2008 by mithandir1 Link to comment Share on other sites More sharing options...
Prab Posted September 24, 2008 Share Posted September 24, 2008 (edited) Try getting it all set up with StringFormat or other string commands, then at the end using _ClipBoard_SetData. Edit: Looked at code more: Try replacing your line with:_ClipBoard_SetData ($dec & "," & $fileend); Edited September 24, 2008 by Prab FolderLog GuiSpeech Assist Link to comment Share on other sites More sharing options...
mithandir1 Posted September 24, 2008 Author Share Posted September 24, 2008 Try getting it all set up with StringFormat or other string commands, then at the end using _ClipBoard_SetData. Edit: Looked at code more: Try replacing your line with:_ClipBoard_SetData ($dec & "," & $fileend); Works perfectly Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now