Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lang racket
- #| the purpose of this tool to toggle HeSuVi on/off without opening the GUI
- HeSuVi is a virtual surround sound tool for EqualizerAPO, utilizing dozens of HRIR files
- the newest version of HeSuVi (at this time, 2.0) makes it especially annoying to toggle on/off
- however, added is a new HRIR designed for speakers. haven't tried, but it's cool anyway.
- if you're not a robot scanning pastebin, give it a try at their sourceforge. it's a great program
- and i'll continue to shill it to everyone. |#
- ;actually writing the file thru port
- (define (writefile y x)
- (with-output-to-file y #:exists 'replace
- (lambda () (display x))))
- ;should add folder checks but who cares its for my own use
- (define eq
- "C:\\Program Files\\EqualizerAPO\\config\\HeSuVi\\postlude.txt")
- (define deact
- "C:\\Program Files\\EqualizerAPO\\config\\HeSuVi\\deact.txt")
- ;change file
- (define (off)
- (writefile eq "# Include: ..\\test.txt")
- (writefile deact "Eval: active=false"))
- (define (on)
- (writefile eq "Include: ..\\test.txt")
- (writefile deact "Eval: active=true"))
- (define (fajl)
- (substring (file->string deact) 13)) ;finds everything after 14th char
- (define (onoff) ; check if on
- (cond
- [(string=? "false" (fajl)) "[OFF]"]
- [(string=? "true" (fajl)) "[ON]"]
- [else "[you done fucked up somewhere]"]))
- (define (retry)
- (printf "\n\n\nUH OH!!!! Try again\n\n\n")
- (main))
- (define (main)
- (system "cls") ; cmd.exe -> cls
- (printf "It is currently... ~a\n\n" (onoff))
- (printf "----------------------------------\n\n")
- (printf "Are you turning it ON or OFF?")
- (printf "\n\n\n[1]: ON\n\n[2]: OFF\n\n\n")
- (printf "Enter your selection: ")
- (define ask
- (read))
- (cond
- [(= ask 1) (on)]
- [(= ask 2) (off)]
- [else (retry)]))
- (main) ;call main function
Add Comment
Please, Sign In to add comment