topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 12:02 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - schnarkle [ switch to compact view ]

Pages: [1]
1
Hello,

I'm trying to script a download routine to get 7 days worth of comics at a time.  This is using Autohotkey.

The folder structure is like this  www.whatever.com/comics/2016/04
and filename like this "sf20160401.tif"

Here is what I have so far, and it works but when changing days it's not changing the folder structure to match..

gui, add, DateTime, vmydate altsubmit
Gui, add, Button, gGo ym, Go
Gui, Show
return

Go:
Gui, Submit
Year := SubStr(mydate,1,4)
Month := SubStr(mydate,5,2)
Day := SubStr(mydate,7,2)
SetWorkingDir, %A_Desktop%\comics

BlockInput On ;disables keyboard or mouse use when script is running

; SALLY FORTH
MyURLpass :="user:pwd"
MyURLYear := Substr(mydate,1,4)
MyURLMonth := Substr(mydate,5,2)
MyURLDay := Substr(mydate,7,2)
MyURL := "http://bbs.rbma.com/repo/Sally_Forth/" A_YYYY "/" A_MM "/"
Year := SubStr(mydate,1,4) ; had to change year for Beck arrangement

while n<7{
MyFile= SFT%date%.tif
RunWait % "curl.exe -o " MyFile " -u " MyURLpass " " MyURL "" MyFile ; -v more talkitive
EnvAdd Date, 1, Days      ;increases day by one
FormatTime, date, %date%, yyyyMMdd ;fixes formatting from EnvAdd, which adds a timestamp
}

Can anyone give it a go?  Even if you have to trash the cludge that I have ;)  ?

thanks!

2
Finished Programs / DONE: Using AHK and PDFTK to combine daily pdf's
« on: November 14, 2012, 05:40 PM »
Hello,

I need to come up with a way of combining daily extracted pdfs in the proper order but am having problems with the number of different publications.

Our naming convention is :

pub  date     section
--------------------  
MM_111412_A01.pdf
MM_111412_A02.pdf
MM_111412_B01.pdf
MC_111412_A01.pdf
WR_111412_A01.pdf

I can do this for one pub easily i.e.

Code: Autohotkey [Select]
  1. SetWorkingDir, %A_ScriptDir%
  2. pub = MM
  3.  
  4. dest = D:\DATA\archives\hot\
  5. formattime, date, MMddyy, MMddyy
  6.  
  7. filename1 = %pub%_%date%_*.pdf
  8.  
  9. ifexist %filename1%
  10. Runwait %comspec% /c pdftk %filename1% cat output %dest%EA_%date%.pdf

But with 7 different pubs, some of which may or may not appear on a daily basis, I am stuck.

Here's what I came up with but it is not getting every pub and some pages are repeating.  I am trying but am an amateur N00B :)
Also, the pub order is as seen top to bottom.

Code: Autohotkey [Select]
  1. SetWorkingDir, %A_ScriptDir%
  2. pub = MM
  3. pub2 = MC
  4. pub3 = FE
  5. pub4 = CS
  6. pub5 = RE
  7. pub6 = VL
  8. pub7 = WR
  9.  
  10. dest = D:\DATA\archives\hot\
  11. formattime, date, MMddyy, MMddyy
  12.  
  13. filename1 = %pub%_%date%_*.pdf
  14. filename2 = %pub2%_%date%_*.pdf
  15. filename3 = %pub3%_%date%_*.pdf
  16. filename4 = %pub4%_%date%_*.pdf
  17. filename5 = %pub5%_%date%_*.pdf
  18. filename6 = %pub6%_%date%_*.pdf
  19. filename7 = %pub7%_%date%_*.pdf
  20.  
  21. FileList =
  22. Loop, *_%date%_*.pdf
  23. {
  24.  FileList = %FileList%%A_LoopFileName%`n
  25.  
  26.  Runwait %comspec% /c pdftk %filename1% %A_LoopFileName% cat output MTR_%date%.pdf
  27. }
Can anyone help?


3
Unfinished Requests / UNFINISHED: Upload files listed in text file
« on: August 19, 2010, 01:45 PM »
I've tried tons of different google searches but I can't find anyone that's tried this so here goes.

I would like a script that would read a text/xml file with content like this:

123.jpg
234.jpg
555.jpg
aaa.jpg
atr.jpg
etc.jpg

and upload via FTP the listed files from a set folder.
Possible?   ;)

4
A colleague developed this applescript to import comics into a template as seen below and I've been reading up on Javascript trying to figure out how to convert this for use in our windows environment:

--This script will open an Adobe Indesign page for the Comics and flow all comics files for the selected date.
set displayString to "Please Enter Year"
set DYear to (year of (current date))
set response to display dialog displayString default answer DYear
set theNumber to (text returned of response) as number
set DYear to text returned of response
set displayString to "Please Enter Month"
set Dmonth to do shell script "date '+%m'"
set response to display dialog displayString default answer Dmonth
set theNumber to (text returned of response) as number
set Dmonth to text returned of response
set displayString to "Please Enter Day"
set Dday to (day of (current date)) + 1
set response to display dialog displayString default answer Dday
set theNumber to (text returned of response) as number
set Dday to text returned of response
tell application "Adobe InDesign CS4"
set comic1 to "macintosh Hd:users:marshall:documents:comics:" & DYear & Dmonth & Dday & "pzjud-a.tif"
set comic2 to "macintosh hd:users:marshall:documents:comics:fct" & DYear & Dmonth & Dday & ".tif"
set comic3 to "macintosh hd:users:marshall:documents:comics:det" & DYear & Dmonth & Dday & ".tif"
set comic4 to "Macintosh HD:users:marshall:documents:comics:bbt" & DYear & Dmonth & Dday & ".tif"
set comic5 to "Macintosh HD:users:marshall:documents:comics:blt" & DYear & Dmonth & Dday & ".tif"
set mydoc to open "Macintosh HD:users:marshall:documents:comix:GGDailyBlank.indd"
tell mydoc
tell page 1
set myrect1 to page item named "image1"
set myrect2 to page item named "image2"
set myrect3 to page item named "image3"
set myrect4 to page item named "image4"
set myrect5 to page item named "image5"
tell myrect1
set myGraphic to place (comic1 as string)
fit myrect1 given content to frame
end tell
tell myrect2
set myGraphic to place (comic2 as string)
fit myrect2 given content to frame
end tell
tell myrect3
set myGraphic to place (comic3 as string)
fit myrect3 given content to frame
end tell
tell myrect4
set myGraphic to place (comic4 as string)
fit myrect4 given content to frame
end tell
tell myrect5
set myGraphic to place (comic5 as string)
fit myrect5 given content to frame
end tell
end tell
end tell

-------------------------------------------------------

Any tips or ideas to help get me started with this?  Most of the tutorials I'm reading deal with text and not images...

Thanks for any help!

 

Doug

5
I play guitar at church and would like to be able to select a song order from a list of .pdf files, hit submit and have the songs display in correct order while I page down from one song to the next.

sample.jpg

The list of pdf files is in a single directory online.  I'm thinking php to do this?
I would like to be able to just drop new pdfs in the folder via ftp and have them listed out on the fly if possible.

The image is an idea of what I'm thinking it could look like...

6
Post New Requests Here / Autosave for QuarkXPress 4.x
« on: October 22, 2007, 11:19 AM »
This may be impossible, but I work at a newspaper and we use Quark Xpress 4.11 throughout the building. Page designers are notorious for having a ton of open documents in Quark at all times. Then when quark crashes they lose a ton of work and we (I.T.) get the blame.

Quark's Ctrl-S saves the current document, not the underlying ones. As far as I can tell there is no "save all" command. I'd love to save all their docs every 15 mins or so.

We constantly tell them to save early and often, but.. well people are lazy.

Anyone out there have any ideas?

Also need to mention that the built-in autosave function in Quark saves the document locally to the C drive and breaks our database link. It should save to the network but doesn't and breaks the reporters queues.

Attached is an AHK script I wrote but it is pretty intrusive in that it freezes all input while saving and crashes Quark if it is flowing text when it activates.

Thanks!


Pages: [1]